pub struct Broadcaster<T: Clone> { /* private fields */ }
Expand description
A broadcaster which sends out broadcasts to all of it’s subscribers.
Implementations§
Source§impl<T: Clone> Broadcaster<T>
impl<T: Clone> Broadcaster<T>
Sourcepub fn process_pending_subscriptions(&mut self)
pub fn process_pending_subscriptions(&mut self)
Process all pending subscriptions.
Sourcepub fn process_pending_subscriptions_with<F: FnMut(&mut Sender<T>)>(
&mut self,
f: &mut F,
)
pub fn process_pending_subscriptions_with<F: FnMut(&mut Sender<T>)>( &mut self, f: &mut F, )
Process all pending subscriptions. This method calls a function on each sender before adding it.
Sourcepub fn subscription_manager(&self) -> SubscriptionManager<T>
pub fn subscription_manager(&self) -> SubscriptionManager<T>
Get a subscription manager which can be cloned or sent.
Trait Implementations§
Source§impl<T: Clone + Clone> Clone for Broadcaster<T>
impl<T: Clone + Clone> Clone for Broadcaster<T>
Source§fn clone(&self) -> Broadcaster<T>
fn clone(&self) -> Broadcaster<T>
Returns a copy 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: Clone> Default for Broadcaster<T>
impl<T: Clone> Default for Broadcaster<T>
Source§impl<T: Clone> SubscriptionRegistration<T> for Broadcaster<T>
impl<T: Clone> SubscriptionRegistration<T> for Broadcaster<T>
Auto Trait Implementations§
impl<T> Freeze for Broadcaster<T>
impl<T> RefUnwindSafe for Broadcaster<T>
impl<T> Send for Broadcaster<T>where
T: Send,
impl<T> Sync for Broadcaster<T>where
T: Send,
impl<T> Unpin for Broadcaster<T>
impl<T> UnwindSafe for Broadcaster<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