Struct futures_signals::signal::Broadcaster [−][src]
pub struct Broadcaster<A> where
A: Signal, { /* fields omitted */ }
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
pub fn signal_ref<B, F>(&self, f: F) -> BroadcasterSignalRef<A, F> where
F: FnMut(&A::Item) -> B,
[src]Returns a new Signal
which copies values from the input Signal
Returns a new Signal
which clones values from the input Signal
Trait Implementations
Auto Trait Implementations
impl<A> RefUnwindSafe for Broadcaster<A>
impl<A> Unpin for Broadcaster<A>
impl<A> UnwindSafe for Broadcaster<A>