pub trait SessionExt {
// Required method
fn declare_publication_cache<'a, 'b, 'c, TryIntoKeyExpr>(
&'a self,
pub_key_expr: TryIntoKeyExpr,
) -> PublicationCacheBuilder<'a, 'b, 'c>
where TryIntoKeyExpr: TryInto<KeyExpr<'b>>,
<TryIntoKeyExpr as TryInto<KeyExpr<'b>>>::Error: Into<Error>;
}
Expand description
Some extensions to the zenoh::Session
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Required Methods§
Sourcefn declare_publication_cache<'a, 'b, 'c, TryIntoKeyExpr>(
&'a self,
pub_key_expr: TryIntoKeyExpr,
) -> PublicationCacheBuilder<'a, 'b, 'c>
👎Deprecated: Use AdvancedPublisher
and AdvancedSubscriber
instead.
fn declare_publication_cache<'a, 'b, 'c, TryIntoKeyExpr>( &'a self, pub_key_expr: TryIntoKeyExpr, ) -> PublicationCacheBuilder<'a, 'b, 'c>
AdvancedPublisher
and AdvancedSubscriber
instead.Declare a PublicationCache
.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Examples:
use zenoh_ext::SessionExt;
use zenoh_config::ModeDependentValue::Unique;
let mut config = zenoh::Config::default();
config.timestamping.set_enabled(Some(Unique(true)));
let session = zenoh::open(config).await.unwrap();
let publication_cache = session.declare_publication_cache("key/expression").await.unwrap();
tokio::task::spawn(async move {
publication_cache.key_expr();
}).await;
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl SessionExt for Session
impl SessionExt for Session
Source§fn declare_publication_cache<'a, 'b, 'c, TryIntoKeyExpr>(
&'a self,
pub_key_expr: TryIntoKeyExpr,
) -> PublicationCacheBuilder<'a, 'b, 'c>
fn declare_publication_cache<'a, 'b, 'c, TryIntoKeyExpr>( &'a self, pub_key_expr: TryIntoKeyExpr, ) -> PublicationCacheBuilder<'a, 'b, 'c>
👎Deprecated: Use
AdvancedPublisher
and AdvancedSubscriber
instead.