pub struct TopicStore { /* private fields */ }Expand description
Last values of sticky topics.
Implementations§
Source§impl TopicStore
impl TopicStore
Sourcepub fn publish(
&self,
publisher: &str,
topic: &str,
data: JsonValue,
sticky: bool,
) -> Option<TopicValue>
pub fn publish( &self, publisher: &str, topic: &str, data: JsonValue, sticky: bool, ) -> Option<TopicValue>
Records a publish; returns the value to fan out, None when a sticky value did not
change (no event needed).
Sourcepub fn get(&self, topic: &str) -> Option<TopicValue>
pub fn get(&self, topic: &str) -> Option<TopicValue>
Last sticky value of topic.
Sourcepub fn snapshot(&self, patterns: &[String]) -> Vec<TopicValue>
pub fn snapshot(&self, patterns: &[String]) -> Vec<TopicValue>
Sticky values matching any of patterns, in first-publish order.
Trait Implementations§
Source§impl Debug for TopicStore
impl Debug for TopicStore
Auto Trait Implementations§
impl !Freeze for TopicStore
impl RefUnwindSafe for TopicStore
impl Send for TopicStore
impl Sync for TopicStore
impl Unpin for TopicStore
impl UnsafeUnpin for TopicStore
impl UnwindSafe for TopicStore
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