pub struct TopicSubscriber { /* private fields */ }Expand description
A subscriber that only receives events matching its declared topics.
Implementations§
Source§impl TopicSubscriber
impl TopicSubscriber
Sourcepub async fn recv(&mut self) -> Option<RuntimeEvent>
pub async fn recv(&mut self) -> Option<RuntimeEvent>
Receive the next event matching the subscriber’s topics.
Sourcepub fn topics(&self) -> &HashSet<EventTopic>
pub fn topics(&self) -> &HashSet<EventTopic>
Return the set of topics this subscriber is interested in.
Auto Trait Implementations§
impl Freeze for TopicSubscriber
impl !RefUnwindSafe for TopicSubscriber
impl Send for TopicSubscriber
impl Sync for TopicSubscriber
impl Unpin for TopicSubscriber
impl UnsafeUnpin for TopicSubscriber
impl !UnwindSafe for TopicSubscriber
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