pub struct PollEvent<'a, T> { /* private fields */ }
Expand description
An event returned by PollContext::wait
.
Implementations§
Source§impl<'a, T: PollToken> PollEvent<'a, T>
impl<'a, T: PollToken> PollEvent<'a, T>
Sourcepub fn token(&self) -> T
pub fn token(&self) -> T
Gets the token associated in
PollContext::add
with this event.
Sourcepub fn raw_events(&self) -> u32
pub fn raw_events(&self) -> u32
Get the raw events returned by the kernel.
Sourcepub fn readable(&self) -> bool
pub fn readable(&self) -> bool
Checks if the event is readable.
True if the fd
associated with this token in
PollContext::add
is readable.
Sourcepub fn writable(&self) -> bool
pub fn writable(&self) -> bool
Checks if the event is writable.
True if the fd
associated with this token in
PollContext::add
is writable.
Sourcepub fn hungup(&self) -> bool
pub fn hungup(&self) -> bool
Checks if the event has been hangup on.
True if the fd
associated with this token in
PollContext::add
has been hungup on.
Sourcepub fn has_error(&self) -> bool
pub fn has_error(&self) -> bool
Checks if the event has associated error conditions.
True if the fd
associated with this token in
PollContext::add
has associated error conditions.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for PollEvent<'a, T>
impl<'a, T> RefUnwindSafe for PollEvent<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for PollEvent<'a, T>where
T: Send,
impl<'a, T> Sync for PollEvent<'a, T>where
T: Sync,
impl<'a, T> Unpin for PollEvent<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for PollEvent<'a, T>where
T: UnwindSafe,
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