pub struct Executor<T> { /* private fields */ }
Expand description
A future executor as an event source
Trait Implementations§
Source§impl<T> EventSource for Executor<T>
impl<T> EventSource for Executor<T>
Source§type Error = ExecutorError
type Error = ExecutorError
The error type returned from
process_events()
(not the user callback!).Source§fn process_events<F>(
&mut self,
readiness: Readiness,
token: Token,
callback: F,
) -> Result<PostAction, Self::Error>
fn process_events<F>( &mut self, readiness: Readiness, token: Token, callback: F, ) -> Result<PostAction, Self::Error>
Process any relevant events Read more
Source§fn register(
&mut self,
poll: &mut Poll,
token_factory: &mut TokenFactory,
) -> Result<()>
fn register( &mut self, poll: &mut Poll, token_factory: &mut TokenFactory, ) -> Result<()>
Register yourself to this poll instance Read more
Source§fn reregister(
&mut self,
poll: &mut Poll,
token_factory: &mut TokenFactory,
) -> Result<()>
fn reregister( &mut self, poll: &mut Poll, token_factory: &mut TokenFactory, ) -> Result<()>
Re-register your file descriptors Read more
Source§fn unregister(&mut self, poll: &mut Poll) -> Result<()>
fn unregister(&mut self, poll: &mut Poll) -> Result<()>
Unregister your file descriptors Read more
Source§const NEEDS_EXTRA_LIFECYCLE_EVENTS: bool = false
const NEEDS_EXTRA_LIFECYCLE_EVENTS: bool = false
Whether this source needs to be sent the
EventSource::before_sleep
and EventSource::before_handle_events
notifications. These are opt-in because
they require more expensive checks, and almost all sources will not need these notificationsSource§fn before_sleep(&mut self) -> Result<Option<(Readiness, Token)>>
fn before_sleep(&mut self) -> Result<Option<(Readiness, Token)>>
Notification that a single
poll
is about to begin Read moreSource§fn before_handle_events(&mut self, events: EventIterator<'_>)
fn before_handle_events(&mut self, events: EventIterator<'_>)
Notification that polling is complete, and
EventSource::process_events
will
be called with the given events for this source. The iterator may be empty,
which indicates that no events were generated for this source Read moreAuto Trait Implementations§
impl<T> Freeze for Executor<T>
impl<T> !RefUnwindSafe for Executor<T>
impl<T> !Send for Executor<T>
impl<T> !Sync for Executor<T>
impl<T> Unpin for Executor<T>
impl<T> !UnwindSafe for Executor<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more