Struct Interest
struct Interest(_)
Readiness event interest.
Specifies the readiness events the caller is interested in when awaiting on I/O resource readiness states.
Implementations
impl Interest
const fn is_readable(self: Self) -> boolReturns true if the value includes readable interest.
Examples
use Interest; assert!; assert!; let both = READABLE | WRITABLE; assert!;const fn is_writable(self: Self) -> boolReturns true if the value includes writable interest.
Examples
use Interest; assert!; assert!; let both = READABLE | WRITABLE; assert!;const fn is_error(self: Self) -> boolReturns true if the value includes error interest.
Examples
use Interest; assert!; assert!; let combined = READABLE | ERROR; assert!;const fn is_priority(self: Self) -> boolReturns true if the value includes priority interest.
Examples
use Interest; assert!; assert!; let both = READABLE | PRIORITY; assert!;const fn add(self: Self, other: Interest) -> InterestAdd together two
Interestvalues.This function works from a
constcontext.Examples
use Interest; const BOTH: Interest = READABLE.add; assert!; assert!;fn remove(self: Self, other: Interest) -> Option<Interest>Remove
Interestfromself.Interests present in
otherbut not inselfare ignored.Returns
Noneif the set would be empty after removingInterest.Examples
use Interest; const RW_INTEREST: Interest = READABLE.add; let w_interest = RW_INTEREST.remove.unwrap; assert!; assert!; // Removing all interests from the set returns `None`. assert_eq!; // Remove all interests at once. assert_eq!;
impl BitOr for Interest
fn bitor(self: Self, other: Self) -> Self
impl BitOrAssign for Interest
fn bitor_assign(self: &mut Self, other: Self)
impl Clone for Interest
fn clone(self: &Self) -> Interest
impl Copy for Interest
impl Debug for Interest
fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result
impl Eq for Interest
impl Freeze for Interest
impl PartialEq for Interest
fn eq(self: &Self, other: &Interest) -> bool
impl RefUnwindSafe for Interest
impl Send for Interest
impl StructuralPartialEq for Interest
impl Sync for Interest
impl Unpin for Interest
impl UnsafeUnpin for Interest
impl UnwindSafe for Interest
impl<T> Any for Interest
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Interest
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Interest
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Interest
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Interest
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Interest
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Interest
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Interest
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Interest
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>