Struct calloop::Dispatcher [−][src]
pub struct Dispatcher<'a, S, Data>(_);
Expand description
An event source with its callback.
The Dispatcher
can be registered in an event loop.
Use the as_source_{ref,mut}
functions to interact with the event source.
Use into_source_inner
to get the event source back.
Implementations
Builds a dispatcher.
The resulting Dispatcher
Returns an immutable reference to the event source.
Panics
Has the same semantics as RefCell::borrow()
.
The dispatcher being mutably borrowed while its events are dispatched, this method will panic if invoked from within the associated dispatching closure.
Returns a mutable reference to the event source.
Panics
Has the same semantics as RefCell::borrow_mut()
.
The dispatcher being mutably borrowed while its events are dispatched, this method will panic if invoked from within the associated dispatching closure.
Consumes the Dispatcher and returns the inner event source.
Panics
Panics if the Dispatcher
is still registered.
Trait Implementations
Auto Trait Implementations
impl<'a, S, Data> !RefUnwindSafe for Dispatcher<'a, S, Data>
impl<'a, S, Data> !Send for Dispatcher<'a, S, Data>
impl<'a, S, Data> !Sync for Dispatcher<'a, S, Data>
impl<'a, S, Data> Unpin for Dispatcher<'a, S, Data>
impl<'a, S, Data> !UnwindSafe for Dispatcher<'a, S, Data>
Blanket Implementations
Mutably borrows from an owned value. Read more