pub struct BroadcastMap<T>where
T: BroadcastTrait,{ /* private fields */ }
Implementations§
Source§impl<T> BroadcastMap<T>where
T: BroadcastMapTrait,
impl<T> BroadcastMap<T>where
T: BroadcastMapTrait,
pub fn new() -> BroadcastMap<T>
pub fn insert<K>(&self, key: K, capacity: usize) -> Option<Broadcast<T>>where
K: ToString,
pub fn receiver_count(&self, key: &str) -> Option<usize>
pub fn subscribe(&self, key: &str) -> Option<Receiver<T>>
pub fn subscribe_unwrap_or_insert(&self, key: &str) -> Receiver<T>
pub fn send(&self, key: &str, data: T) -> Result<Option<usize>, SendError<T>>
Trait Implementations§
Source§impl<T> Clone for BroadcastMap<T>where
T: Clone + BroadcastTrait,
impl<T> Clone for BroadcastMap<T>where
T: Clone + BroadcastTrait,
Source§fn clone(&self) -> BroadcastMap<T>
fn clone(&self) -> BroadcastMap<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for BroadcastMap<T>where
T: Debug + BroadcastTrait,
impl<T> Debug for BroadcastMap<T>where
T: Debug + BroadcastTrait,
Source§impl<T> Default for BroadcastMap<T>where
T: BroadcastMapTrait,
impl<T> Default for BroadcastMap<T>where
T: BroadcastMapTrait,
Source§fn default() -> BroadcastMap<T>
fn default() -> BroadcastMap<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for BroadcastMap<T>
impl<T> !RefUnwindSafe for BroadcastMap<T>
impl<T> Send for BroadcastMap<T>where
T: Send,
impl<T> Sync for BroadcastMap<T>where
T: Send,
impl<T> Unpin for BroadcastMap<T>
impl<T> !UnwindSafe for BroadcastMap<T>
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