pub struct TopicMatcherNode<T> { /* private fields */ }Expand description
Node in the topic matching tree that represents a part of the topic path.
Used internally by the TopicMatcher.
Implementations§
Source§impl<T: Default + Len> TopicMatcherNode<T>
impl<T: Default + Len> TopicMatcherNode<T>
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when this node holds no payload and has no children,
i.e. it carries no subscriptions and can be removed by its parent.
Sourcepub fn get_or_create_subscription_table(
&mut self,
topic_path: &TopicPatternPath,
) -> &mut T
pub fn get_or_create_subscription_table( &mut self, topic_path: &TopicPatternPath, ) -> &mut T
Finds or creates a subscription data entry matching the given topic pattern
Sourcepub fn update_node<F>(
&mut self,
topic_path: &[TopicPatternItem],
f: F,
) -> Result<bool, TopicMatcherError>
pub fn update_node<F>( &mut self, topic_path: &[TopicPatternItem], f: F, ) -> Result<bool, TopicMatcherError>
Finds or creates a subscription data entry matching the given topic pattern
Sourcepub fn find_by_path<'a>(&'a self, topic: &TopicPath) -> Vec<&'a T>
pub fn find_by_path<'a>(&'a self, topic: &TopicPath) -> Vec<&'a T>
Finds all subscription data entries matching the given topic path
Trait Implementations§
Source§impl<T: Debug> Debug for TopicMatcherNode<T>
impl<T: Debug> Debug for TopicMatcherNode<T>
Auto Trait Implementations§
impl<T> Freeze for TopicMatcherNode<T>where
T: Freeze,
impl<T> RefUnwindSafe for TopicMatcherNode<T>where
T: RefUnwindSafe,
impl<T> Send for TopicMatcherNode<T>where
T: Send,
impl<T> Sync for TopicMatcherNode<T>where
T: Sync,
impl<T> Unpin for TopicMatcherNode<T>where
T: Unpin,
impl<T> UnsafeUnpin for TopicMatcherNode<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TopicMatcherNode<T>where
T: UnwindSafe,
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