pub struct EventStream<MSG> { /* fields omitted */ }
A stream of messages to be used for widget/signal communication and inter-widget communication.
EventStream cannot be send to another thread. Use a Channel
Sender
instead.
Create a new event stream.
Close the event stream, i.e. stop processing messages.
Send the event
message to the stream and the observers.
Lock the stream (don't emit message) until the Lock
goes out of scope.
pub fn observe<CALLBACK: Fn(&MSG) + 'static>(&self, callback: CALLBACK) | [src] |
Add an observer to the event stream.
This callback will be called every time a message is emmited.
Add a callback to the event stream.
This is the main callback and received a owned version of the message, in contrast to
observe().
Performs copy-assignment from source
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static