pub struct AdvancedSubscriber<Receiver> { /* private fields */ }Expand description
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Implementations§
Source§impl<Handler> AdvancedSubscriber<Handler>
impl<Handler> AdvancedSubscriber<Handler>
Sourcepub fn id(&self) -> EntityGlobalId
pub fn id(&self) -> EntityGlobalId
Returns the EntityGlobalId of this AdvancedSubscriber.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Sourcepub fn key_expr(&self) -> &KeyExpr<'static>
pub fn key_expr(&self) -> &KeyExpr<'static>
Returns the KeyExpr this subscriber subscribes to.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Sourcepub fn handler(&self) -> &Handler
pub fn handler(&self) -> &Handler
Returns a reference to this subscriber’s handler.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
An handler is anything that implements [`zenoh::handlers::IntoHandler`].
The default handler is [`zenoh::handlers::DefaultHandler`].Sourcepub fn handler_mut(&mut self) -> &mut Handler
pub fn handler_mut(&mut self) -> &mut Handler
Returns a mutable reference to this subscriber’s handler.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
An handler is anything that implements [`zenoh::handlers::IntoHandler`].
The default handler is [`zenoh::handlers::DefaultHandler`].Sourcepub fn sample_miss_listener(
&self,
) -> SampleMissListenerBuilder<'_, DefaultHandler>
pub fn sample_miss_listener( &self, ) -> SampleMissListenerBuilder<'_, DefaultHandler>
Declares a listener to detect missed samples.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Missed samples can only be detected from AdvancedPublisher that
enable sample_miss_detection.
Sourcepub fn detect_publishers(
&self,
) -> LivelinessSubscriberBuilder<'_, '_, DefaultHandler>
pub fn detect_publishers( &self, ) -> LivelinessSubscriberBuilder<'_, '_, DefaultHandler>
Declares a listener to detect matching publishers.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Only AdvancedPublisher that enable
publisher_detection can be detected.
Trait Implementations§
Source§impl<Receiver> Deref for AdvancedSubscriber<Receiver>
impl<Receiver> Deref for AdvancedSubscriber<Receiver>
Auto Trait Implementations§
impl<Receiver> Freeze for AdvancedSubscriber<Receiver>where
Receiver: Freeze,
impl<Receiver> !RefUnwindSafe for AdvancedSubscriber<Receiver>
impl<Receiver> Send for AdvancedSubscriber<Receiver>where
Receiver: Send,
impl<Receiver> Sync for AdvancedSubscriber<Receiver>where
Receiver: Sync,
impl<Receiver> Unpin for AdvancedSubscriber<Receiver>where
Receiver: Unpin,
impl<Receiver> !UnwindSafe for AdvancedSubscriber<Receiver>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more