Struct tokio::io::Interest [−][src]
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
Interest in all readable events.
Readable interest includes read-closed events.
Interest in all writable events.
Writable interest includes write-closed events.
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());
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
Auto Trait Implementations
impl RefUnwindSafe for Interest
impl UnwindSafe for Interest
Blanket Implementations
Mutably borrows from an owned value. Read more