pub struct Broadcaster<A>where
A: Signal,{ /* private fields */ }
Expand description
Splits an input Signal
into multiple output Signals
.
Broadcaster
provides .signal()
, .signal_cloned()
, and .signal_ref()
methods which can be used to create multiple signals from a single signal.
This is useful because Signal
usually does not implement Clone
, so it is
necessary to use Broadcaster
to “clone” a Signal
.
If you are using a Mutable
then you don’t need Broadcaster
, because
Mutable
already supports the .signal()
, .signal_cloned()
and
.signal_ref()
methods (they are faster than Broadcaster
).
Implementations§
Source§impl<A> Broadcaster<A>where
A: Signal,
impl<A> Broadcaster<A>where
A: Signal,
pub fn signal_ref<B, F>(&self, f: F) -> BroadcasterSignalRef<A, F>
Source§impl<A> Broadcaster<A>
impl<A> Broadcaster<A>
Sourcepub fn signal(&self) -> BroadcasterSignal<A>
pub fn signal(&self) -> BroadcasterSignal<A>
Returns a new Signal
which copies values from the input Signal
Source§impl<A> Broadcaster<A>
impl<A> Broadcaster<A>
Sourcepub fn signal_cloned(&self) -> BroadcasterSignalCloned<A>
pub fn signal_cloned(&self) -> BroadcasterSignalCloned<A>
Returns a new Signal
which clones values from the input Signal
Trait Implementations§
Source§impl<A> Clone for Broadcaster<A>where
A: Signal,
impl<A> Clone for Broadcaster<A>where
A: Signal,
Auto Trait Implementations§
impl<A> Freeze for Broadcaster<A>
impl<A> RefUnwindSafe for Broadcaster<A>
impl<A> Send for Broadcaster<A>
impl<A> Sync for Broadcaster<A>
impl<A> Unpin for Broadcaster<A>
impl<A> UnwindSafe for Broadcaster<A>
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