pub struct PollWrapper { /* private fields */ }Expand description
A wrapper around mio’s Poll method
You can create this
Implementations§
Source§impl PollWrapper
impl PollWrapper
Sourcepub fn new() -> Result<PollWrapper>
pub fn new() -> Result<PollWrapper>
Create a new poll wrapper
Sourcepub fn handle<E>(
self,
handler: impl FnMut(Event, &mut Handle<'_>) -> Result<(), E>,
) -> Result<(), E>
pub fn handle<E>( self, handler: impl FnMut(Event, &mut Handle<'_>) -> Result<(), E>, ) -> Result<(), E>
Start the poll routine. Every time an event gets received, the callback handler gets called.
The first argument of the handler is the event that is received.
The second argument is a handle. See Handle for more information.
Auto Trait Implementations§
impl !Freeze for PollWrapper
impl !RefUnwindSafe for PollWrapper
impl Send for PollWrapper
impl Sync for PollWrapper
impl Unpin for PollWrapper
impl !UnwindSafe for PollWrapper
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