Struct tokio::io::Interest [−][src]
pub struct Interest(_);
This is supported on crate feature
net
only.Expand description
Readiness event interest
Specifies the readiness events the caller is interested in when awaiting on I/O resource readiness states.
Implementations
impl Interest
[src]
impl Interest
[src]pub const READABLE: Interest
[src]
pub const READABLE: Interest
[src]Interest in all readable events.
Readable interest includes read-closed events.
pub const WRITABLE: Interest
[src]
pub const WRITABLE: Interest
[src]Interest in all writable events
Writable interest includes write-closed events.
pub const fn is_readable(self) -> bool
[src]
pub const fn is_readable(self) -> bool
[src]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());
pub const fn is_writable(self) -> bool
[src]
pub const fn is_writable(self) -> bool
[src]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
impl BitOrAssign<Interest> for Interest
[src]
impl BitOrAssign<Interest> for Interest
[src]fn bitor_assign(&mut self, other: Self)
[src]
fn bitor_assign(&mut self, other: Self)
[src]Performs the |=
operation. Read more
impl Copy for Interest
[src]
impl Eq for Interest
[src]
impl StructuralEq for Interest
[src]
impl StructuralPartialEq for Interest
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more