From a7599ef3ef184d19f1d297f48cb2099de9866ffb Mon Sep 17 00:00:00 2001 From: Luca Cominardi Date: Thu, 19 Sep 2024 17:28:31 +0200 Subject: [PATCH] Reliability is exported in zenoh::qos (#1457) --- zenoh-ext/src/querying_subscriber.rs | 2 +- zenoh/src/api/subscriber.rs | 7 ++++--- zenoh/src/lib.rs | 5 ++--- zenoh/tests/session.rs | 2 +- zenoh/tests/shm.rs | 3 +-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/zenoh-ext/src/querying_subscriber.rs b/zenoh-ext/src/querying_subscriber.rs index f35c2ecbdb..80e00741c1 100644 --- a/zenoh-ext/src/querying_subscriber.rs +++ b/zenoh-ext/src/querying_subscriber.rs @@ -21,7 +21,7 @@ use std::{ }; #[cfg(feature = "unstable")] -use zenoh::pubsub::Reliability; +use zenoh::qos::Reliability; use zenoh::{ handlers::{locked, Callback, DefaultHandler, IntoHandler}, internal::zlock, diff --git a/zenoh/src/api/subscriber.rs b/zenoh/src/api/subscriber.rs index dbe1b63dc0..c8c45ae09a 100644 --- a/zenoh/src/api/subscriber.rs +++ b/zenoh/src/api/subscriber.rs @@ -21,10 +21,11 @@ use tracing::error; use zenoh_core::{Resolvable, Wait}; use zenoh_result::ZResult; #[cfg(feature = "unstable")] -use {zenoh_config::wrappers::EntityGlobalId, zenoh_protocol::core::EntityGlobalIdProto}; +use { + crate::qos::Reliability, zenoh_config::wrappers::EntityGlobalId, + zenoh_protocol::core::EntityGlobalIdProto, +}; -#[cfg(feature = "unstable")] -use crate::pubsub::Reliability; use crate::{ api::{ handlers::{locked, Callback, DefaultHandler, IntoHandler}, diff --git a/zenoh/src/lib.rs b/zenoh/src/lib.rs index 3987a56f08..4c0522475e 100644 --- a/zenoh/src/lib.rs +++ b/zenoh/src/lib.rs @@ -228,9 +228,6 @@ pub mod bytes { /// Pub/sub primitives pub mod pubsub { - #[zenoh_macros::unstable] - pub use zenoh_protocol::core::Reliability; - #[zenoh_macros::unstable] pub use crate::api::publisher::{ MatchingListener, MatchingListenerBuilder, MatchingListenerUndeclaration, MatchingStatus, @@ -276,6 +273,8 @@ pub mod handlers { /// Quality of service primitives pub mod qos { pub use zenoh_protocol::core::CongestionControl; + #[zenoh_macros::unstable] + pub use zenoh_protocol::core::Reliability; pub use crate::api::publisher::Priority; } diff --git a/zenoh/tests/session.rs b/zenoh/tests/session.rs index 73aedf9588..c94e681181 100644 --- a/zenoh/tests/session.rs +++ b/zenoh/tests/session.rs @@ -25,7 +25,7 @@ use std::{ #[cfg(feature = "internal")] use zenoh::internal::runtime::{Runtime, RuntimeBuilder}; #[cfg(feature = "unstable")] -use zenoh::pubsub::Reliability; +use zenoh::qos::Reliability; use zenoh::{key_expr::KeyExpr, qos::CongestionControl, sample::SampleKind, Session}; use zenoh_core::ztimeout; #[cfg(not(feature = "unstable"))] diff --git a/zenoh/tests/shm.rs b/zenoh/tests/shm.rs index ace7a0ce49..908fc5f2da 100644 --- a/zenoh/tests/shm.rs +++ b/zenoh/tests/shm.rs @@ -21,8 +21,7 @@ use std::{ }; use zenoh::{ - pubsub::Reliability, - qos::CongestionControl, + qos::{CongestionControl, Reliability}, shm::{ zshm, BlockOn, GarbageCollect, PosixShmProviderBackend, ShmProviderBuilder, POSIX_PROTOCOL_ID,