Struct signals::Signal

source ·
pub struct Signal<I, O, F>where
    F: SigFn<I, O>,
{ /* private fields */ }
Expand description

Signals are the bread and butter of the crate. A signal can trigger other signals whose input is the same output as the original signal. Signals support both threaded and non-threaded children.

Implementations§

Create a thread-safe parent signal. Note that the return function is Arc<Mutex<Signal<>>>

This method is a helper for Signal::new(f) and register_listener(…)

This method is a helper for Signal::new(f) and register_threaded_listener(…)

Register a child listener that will execute in the same thread as Self.

Register a child listener that will run on its own thread.

Get the last result of this signal… if it exists

Trait Implementations§

Run closure implemented for signal and pass on the results to children.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.