pub struct Interest(_);
Expand description
Readiness event interest.
Specifies the readiness events the caller is interested in when awaiting on I/O resource readiness states.
Implementations§
source§impl Interest
impl Interest
sourcepub const READABLE: Interest = _
pub const READABLE: Interest = _
Interest in all readable events.
Readable interest includes read-closed events.
sourcepub const WRITABLE: Interest = _
pub const WRITABLE: Interest = _
Interest in all writable events.
Writable interest includes write-closed events.
sourcepub const fn is_readable(self) -> bool
pub const fn is_readable(self) -> bool
Returns true if the value includes readable interest.
Examples
use tokio::io::Interest;
assert!(Interest::READABLE.is_readable());
assert!(!Interest::WRITABLE.is_readable());
let both = Interest::READABLE | Interest::WRITABLE;
assert!(both.is_readable());
sourcepub const fn is_writable(self) -> bool
pub const fn is_writable(self) -> bool
Returns true if the value includes writable interest.
Examples
use tokio::io::Interest;
assert!(!Interest::READABLE.is_writable());
assert!(Interest::WRITABLE.is_writable());
let both = Interest::READABLE | Interest::WRITABLE;
assert!(both.is_writable());
Trait Implementations§
source§impl BitOrAssign<Interest> for Interest
impl BitOrAssign<Interest> for Interest
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|=
operation. Read more