Struct simple_pub_sub::topics::TopicMap
source · pub struct TopicMap {
pub map: HashMap<String, HashMap<String, Sender<Msg>>>,
}Fields§
§map: HashMap<String, HashMap<String, Sender<Msg>>>Implementations§
source§impl TopicMap
impl TopicMap
pub fn query(&self, topic: String) -> String
pub fn add_channel( &mut self, topic: String, client_id: String, channel: Sender<Msg> )
pub fn remove_channel(&mut self, topic: String, client_id: String)
pub fn add_topic(&mut self, topic: String)
pub async fn publish(&mut self, msg: Msg)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TopicMap
impl Send for TopicMap
impl Sync for TopicMap
impl Unpin for TopicMap
impl !UnwindSafe for TopicMap
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