[]Struct epoll::Events

pub struct Events { /* fields omitted */ }

Methods

impl Events

pub const EPOLLET: Events

Sets the Edge Triggered behavior for the associated file descriptor.

The default behavior for epoll is Level Triggered.

pub const EPOLLIN: Events

The associated file is available for read operations.

pub const EPOLLERR: Events

Error condition happened on the associated file descriptor.

wait will always wait for this event; is not necessary to set it in events.

pub const EPOLLHUP: Events

Hang up happened on the associated file descriptor.

wait will always wait for this event; it is not necessary to set it in events. Note that when reading from a channel such as a pipe or a stream socket, this event merely indicates that the peer closed its end of the channel. Subsequent reads from the channel will return 0 (end of file) only after all outstanding data in the channel has been consumed.

pub const EPOLLOUT: Events

The associated file is available for write operations.

pub const EPOLLPRI: Events

There is urgent data available for read operations.

pub const EPOLLRDHUP: Events

Stream socket peer closed connection, or shut down writing half of connection.

This flag is especially useful for writing simple code to detect peer shutdown when using Edge Triggered monitoring.

pub const EPOLLWAKEUP: Events

If EPOLLONESHOT and EPOLLET are clear and the process has the CAP_BLOCK_SUSPEND capability, ensure that the system does not enter "suspend" or "hibernate" while this event is pending or being processed.

The event is considered as being "processed" from the time when it is returned by a call to wait until the next call to wait on the same EpollInstance descriptor, the closure of that file descriptor, the removal of the event file descriptor with EPOLL_CTL_DEL, or the clearing of EPOLLWAKEUP for the event file descriptor with EPOLL_CTL_MOD.

pub const EPOLLONESHOT: Events

Sets the one-shot behavior for the associated file descriptor.

This means that after an event is pulled out with wait the associated file descriptor is internally disabled and no other events will be reported by the epoll interface. The user must call ctl with EPOLL_CTL_MOD to rearm the file descriptor with a new event mask.

pub fn empty() -> Events

Returns an empty set of flags.

pub fn all() -> Events

Returns the set containing all flags.

pub fn bits(&self) -> u32

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u32) -> Option<Events>

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub fn from_bits_truncate(bits: u32) -> Events

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

pub fn is_all(&self) -> bool

Returns true if all flags are currently set.

pub fn intersects(&self, other: Events) -> bool

Returns true if there are flags common to both self and other.

pub fn contains(&self, other: Events) -> bool

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: Events)

Inserts the specified flags in-place.

pub fn remove(&mut self, other: Events)

Removes the specified flags in-place.

pub fn toggle(&mut self, other: Events)

Toggles the specified flags in-place.

pub fn set(&mut self, other: Events, value: bool)

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Extend<Events> for Events

impl PartialOrd<Events> for Events

impl Copy for Events

impl PartialEq<Events> for Events

impl Clone for Events

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for Events

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more

impl Eq for Events

impl Debug for Events

impl Sub<Events> for Events

type Output = Events

The resulting type after applying the - operator.

fn sub(self, other: Events) -> Events

Returns the set difference of the two sets of flags.

impl Hash for Events

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl SubAssign<Events> for Events

fn sub_assign(&mut self, other: Events)

Disables all flags enabled in the set.

impl Not for Events

type Output = Events

The resulting type after applying the ! operator.

fn not(self) -> Events

Returns the complement of this set of flags.

impl BitAnd<Events> for Events

type Output = Events

The resulting type after applying the & operator.

fn bitand(self, other: Events) -> Events

Returns the intersection between the two sets of flags.

impl BitOr<Events> for Events

type Output = Events

The resulting type after applying the | operator.

fn bitor(self, other: Events) -> Events

Returns the union of the two sets of flags.

impl BitXor<Events> for Events

type Output = Events

The resulting type after applying the ^ operator.

fn bitxor(self, other: Events) -> Events

Returns the left flags, but with all the right flags toggled.

impl BitAndAssign<Events> for Events

fn bitand_assign(&mut self, other: Events)

Disables all flags disabled in the set.

impl BitOrAssign<Events> for Events

fn bitor_assign(&mut self, other: Events)

Adds the set of flags.

impl BitXorAssign<Events> for Events

fn bitxor_assign(&mut self, other: Events)

Toggles the set of flags.

impl FromIterator<Events> for Events

impl Octal for Events

impl Binary for Events

impl LowerHex for Events

impl UpperHex for Events

Auto Trait Implementations

impl Send for Events

impl Sync for Events

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.