Struct calloop::LoopHandle [−][src]
pub struct LoopHandle { /* fields omitted */ }
An handle to an event loop
This handle allows you to insert new sources and idles in this event loop, it can be cloned, and it is possible to insert new sources from within a source callback.
Methods
impl LoopHandle
[src]
impl LoopHandle
pub fn insert_source<E: EventSource, F: FnMut(E::Event) + 'static>(
&self,
source: E,
callback: F
) -> Result<Source<E>>
[src]
pub fn insert_source<E: EventSource, F: FnMut(E::Event) + 'static>(
&self,
source: E,
callback: F
) -> Result<Source<E>>
Insert an new event source in the loop
The provided callback will be called during the dispatching cycles whenever the
associated source generates events, see EventLoop::dispatch(..)
for details.
pub fn insert_idle<F: FnMut() + 'static>(&self, callback: F) -> Idle
[src]
pub fn insert_idle<F: FnMut() + 'static>(&self, callback: F) -> Idle
Insert an idle callback
This callback will be called during a dispatching cycle when the event loop has finished processing all pending events from the sources and becomes idle.
Trait Implementations
impl Clone for LoopHandle
[src]
impl Clone for LoopHandle
fn clone(&self) -> LoopHandle
[src]
fn clone(&self) -> LoopHandle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !Send for LoopHandle
impl !Send for LoopHandle
impl !Sync for LoopHandle
impl !Sync for LoopHandle