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
sourceimpl Interest
impl Interest
sourcepub const READABLE: Interest = Interest(mio::Interest::READABLE)
pub const READABLE: Interest = Interest(mio::Interest::READABLE)
Interest in all readable events.
Readable interest includes read-closed events.
sourcepub const WRITABLE: Interest = Interest(mio::Interest::WRITABLE)
pub const WRITABLE: Interest = Interest(mio::Interest::WRITABLE)
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
sourceimpl BitOrAssign<Interest> for Interest
impl BitOrAssign<Interest> for Interest
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the |=
operation. Read more
impl Copy for Interest
impl Eq for Interest
impl StructuralEq for Interest
impl StructuralPartialEq for Interest
Auto Trait Implementations
impl RefUnwindSafe for Interest
impl Send for Interest
impl Sync for Interest
impl Unpin for Interest
impl UnwindSafe for Interest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more