Struct Interest
struct Interest(_)
Interest used in registering.
Interest are used in registering event::Sources with Poll, they
indicate what readiness should be monitored for. For example if a socket is
registered with readable interests and the socket becomes writable, no
event will be returned from a call to poll.
Implementations
impl Interest
const fn add(self: Self, other: Interest) -> InterestAdd together two
Interest.This does the same thing as the
BitOrimplementation, but is a constant function.use Interest; const INTERESTS: Interest = READABLE.add; # # silent_dead_code_warningfn remove(self: Self, other: Interest) -> Option<Interest>Removes
otherInterestfromself.Returns
Noneif the set would be empty after removingother.use Interest; const RW_INTERESTS: Interest = READABLE.add; // As long a one interest remain this will return `Some`. let w_interest = RW_INTERESTS.remove.unwrap; assert!; assert!; // Removing all interests from the set will return `None`. assert_eq!; // Its also possible to remove multiple interests at once. assert_eq!;const fn is_readable(self: Self) -> boolReturns true if the value includes readable readiness.
const fn is_writable(self: Self) -> boolReturns true if the value includes writable readiness.
const fn is_aio(self: Self) -> boolReturns true if
Interestcontains AIO readiness.const fn is_lio(self: Self) -> boolReturns true if
Interestcontains LIO readiness.const fn is_priority(self: Self) -> boolReturns true if
Interestcontains priority readiness.
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 Ord for Interest
fn cmp(self: &Self, other: &Interest) -> Ordering
impl PartialEq for Interest
fn eq(self: &Self, other: &Interest) -> bool
impl PartialOrd for Interest
fn partial_cmp(self: &Self, other: &Interest) -> Option<Ordering>
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>