[−][src]Struct calloop::LoopHandle
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<Data: 'static> LoopHandle<Data>
[src]
pub fn insert_source<E: EventSource, F: FnMut(E::Event, &mut Data) + 'static>(
&self,
source: E,
callback: F
) -> Result<Source<E>, InsertError<E>>
[src]
&self,
source: E,
callback: F
) -> Result<Source<E>, InsertError<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: FnOnce(&mut Data) + 'static>(&self, callback: F) -> Idle
[src]
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<Data> Clone for LoopHandle<Data>
[src]
fn clone(&self) -> LoopHandle<Data>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<Data> !Send for LoopHandle<Data>
impl<Data> !Sync for LoopHandle<Data>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,