Skip to content

Commit

Permalink
unstable predefined parameters unfinihsed
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Jun 11, 2024
1 parent e77401e commit 4b4c6cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions zenoh/src/api/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ pub trait PredefinedParameters {
fn reply_key_expr_any(&self) -> bool;
}

#[cfg(not(feature = "unstable"))]
pub(crate) trait PredefinedParameters {
const REPLY_KEY_EXPR_ANY_SEL_PARAM: &'static str = "_anyke";
const TIME_RANGE_KEY: &'static str = "_time";
fn set_time_range<T: Into<Option<TimeRange>>>(&mut self, time_range: T);
fn set_reply_key_expr_any(&mut self);
fn time_range(&self) -> Option<ZResult<TimeRange>>;
fn reply_key_expr_any(&self) -> bool;
}

impl PredefinedParameters for Parameters<'_> {
/// Sets the time range targeted by the selector parameters.
fn set_time_range<T: Into<Option<TimeRange>>>(&mut self, time_range: T) {
Expand Down
3 changes: 2 additions & 1 deletion zenoh/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ mod _prelude {
#[zenoh_macros::unstable]
pub use crate::api::publisher::PublisherDeclarations;
pub use crate::{
api::selector::PredefinedParameters,
api::{
builders::sample::{
QoSBuilderTrait, SampleBuilderTrait, TimestampBuilderTrait, ValueBuilderTrait,
Expand All @@ -38,6 +37,8 @@ mod _prelude {
config::ValidatedMap,
core::{Error as ZError, Resolvable, Resolve, Result as ZResult},
};
#[zenoh_macros::unstable]
pub use crate::api::selector::PredefinedParameters;
}

pub use _prelude::*;
Expand Down

0 comments on commit 4b4c6cb

Please sign in to comment.