pub struct Source<E: EventSource> { /* private fields */ }
Expand description
An event source that has been inserted into the event loop
This handle allows you to remove it, and possibly more interactions
depending on the source kind that will be provided by the Deref
implementation of this struct to the evented object.
Dropping this handle does not deregister this source from the event loop,
but will drop the wrapped EventSource
, maybe rendering it inert depending on
its implementation.
Implementations
sourceimpl<E: EventSource> Source<E>
impl<E: EventSource> Source<E>
sourcepub fn reregister(&self) -> Result<()>
pub fn reregister(&self) -> Result<()>
Refresh the registration of this event source to the loop
This can be necessary if the evented object provides methods to change its behavior. Its documentation should inform you of the need for re-registration.
Trait Implementations
sourceimpl<E: EventSource> Deref for Source<E>
impl<E: EventSource> Deref for Source<E>
Auto Trait Implementations
impl<E> !RefUnwindSafe for Source<E>
impl<E> !Send for Source<E>
impl<E> !Sync for Source<E>
impl<E> Unpin for Source<E>where
E: Unpin,
impl<E> !UnwindSafe for Source<E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more