pub struct Event {
pub token: Token,
pub readable: bool,
pub writable: bool,
pub error: bool,
pub closed: bool,
}Expand description
I/O event returned by poll
Fields§
§token: TokenToken identifying the source
readable: boolWhether the source is readable
writable: boolWhether the source is writable
error: boolWhether an error occurred
closed: boolWhether the connection was closed
Implementations§
Source§impl Event
impl Event
Sourcepub fn with_readable(self) -> Self
pub fn with_readable(self) -> Self
Set readable flag
Sourcepub fn with_writable(self) -> Self
pub fn with_writable(self) -> Self
Set writable flag
Sourcepub fn with_error(self) -> Self
pub fn with_error(self) -> Self
Set error flag
Sourcepub fn with_closed(self) -> Self
pub fn with_closed(self) -> Self
Set closed flag
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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