Skip to content

Commit 790f3b3

Browse files
committed
make feature internal instead of unstable
1 parent 16ae406 commit 790f3b3

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

zenoh/src/api/session.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ pub(crate) struct SessionState {
156156
pub(crate) aggregated_subscribers: Vec<OwnedKeyExpr>,
157157
pub(crate) aggregated_publishers: Vec<OwnedKeyExpr>,
158158
pub(crate) publisher_qos_tree: KeBoxTree<PublisherQoSConfig>,
159-
#[cfg(feature = "unstable")]
160159
pub(crate) closing_callbacks: ClosingCallbackList,
161160
}
162161

@@ -192,7 +191,6 @@ impl SessionState {
192191
aggregated_subscribers,
193192
aggregated_publishers,
194193
publisher_qos_tree,
195-
#[cfg(feature = "unstable")]
196194
closing_callbacks: Default::default(),
197195
}
198196
}
@@ -1260,6 +1258,8 @@ impl Session {
12601258
/// the callback with [`unregister_closing_callback`](Self::unregister_closing_callback). If
12611259
/// the session is already closed, the callback is returned in an error.
12621260
///
1261+
/// Execution order of callbacks is unspecified.
1262+
///
12631263
/// # Examples
12641264
///
12651265
/// ```rust
@@ -1272,7 +1272,7 @@ impl Session {
12721272
/// }
12731273
/// # }
12741274
/// ```
1275-
#[zenoh_macros::unstable]
1275+
#[zenoh_macros::internal]
12761276
pub fn register_closing_callback<F: FnOnce() + Send + Sync + 'static>(
12771277
&self,
12781278
callback: F,
@@ -1303,7 +1303,7 @@ impl Session {
13031303
/// session.unregister_closing_callback(id);
13041304
/// # }
13051305
/// ```
1306-
#[zenoh_macros::unstable]
1306+
#[zenoh_macros::internal]
13071307
pub fn unregister_closing_callback(&self, callback_id: ClosingCallbackId) {
13081308
let mut state = zwrite!(self.0.state);
13091309
state.closing_callbacks.remove_callback(callback_id);
@@ -3286,14 +3286,12 @@ impl Closeable for Session {
32863286
}
32873287
}
32883288

3289-
#[cfg(feature = "unstable")]
32903289
#[derive(Default)]
32913290
pub(crate) struct ClosingCallbackList {
32923291
callbacks: slab::Slab<ClosingCallback>,
32933292
generation: usize,
32943293
}
32953294

3296-
#[cfg(feature = "unstable")]
32973295
impl ClosingCallbackList {
32983296
fn insert_callback(&mut self, callback: Box<dyn FnOnce() + Send + Sync>) -> ClosingCallbackId {
32993297
let generation = self.generation;
@@ -3312,7 +3310,6 @@ impl ClosingCallbackList {
33123310
}
33133311
}
33143312

3315-
#[cfg(feature = "unstable")]
33163313
impl Drop for ClosingCallbackList {
33173314
fn drop(&mut self) {
33183315
for cb in self.callbacks.drain() {
@@ -3321,7 +3318,6 @@ impl Drop for ClosingCallbackList {
33213318
}
33223319
}
33233320

3324-
#[cfg(feature = "unstable")]
33253321
struct ClosingCallback {
33263322
callback: Box<dyn FnOnce() + Send + Sync>,
33273323
generation: usize,
@@ -3330,7 +3326,6 @@ struct ClosingCallback {
33303326
/// The id of a registered session closing callback.
33313327
///
33323328
/// See [`Session::register_closing_callback`].
3333-
#[zenoh_macros::unstable]
33343329
#[derive(Debug, Clone, PartialEq, Eq)]
33353330
pub struct ClosingCallbackId {
33363331
index: usize,

zenoh/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub mod session {
208208

209209
#[zenoh_macros::internal]
210210
pub use crate::api::builders::session::{init, InitBuilder};
211-
#[zenoh_macros::unstable]
211+
#[zenoh_macros::internal]
212212
pub use crate::api::session::ClosingCallbackId;
213213
pub use crate::api::{
214214
builders::{

0 commit comments

Comments
 (0)