[][src]Struct event_manager::EventSet

pub struct EventSet { /* fields omitted */ }

The type of epoll events we can monitor a file descriptor for. The type of events we can monitor a file descriptor for.

Implementations

impl EventSet[src]

The type of epoll events we can monitor a file descriptor for.

pub const IN: EventSet[src]

The associated file descriptor is available for read operations.

pub const OUT: EventSet[src]

The associated file descriptor is available for write operations.

pub const ERROR: EventSet[src]

Error condition happened on the associated file descriptor.

pub const READ_HANG_UP: EventSet[src]

This can be used to detect peer shutdown when using Edge Triggered monitoring.

pub const EDGE_TRIGGERED: EventSet[src]

Sets the Edge Triggered behavior for the associated file descriptor. The default behavior is Level Triggered.

pub const HANG_UP: EventSet[src]

Hang up happened on the associated file descriptor. Note that epoll_wait will always wait for this event and it is not necessary to set it in events.

pub const PRIORITY: EventSet[src]

There is an exceptional condition on that file descriptor. It is mostly used to set high priority for some data.

pub const WAKE_UP: EventSet[src]

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

pub const ONE_SHOT: EventSet[src]

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

pub const EXCLUSIVE: EventSet[src]

Sets an exclusive wake up mode for the epoll file descriptor that is being attached to the associated file descriptor. When a wake up event occurs and multiple epoll file descriptors are attached to the same target file using this mode, one or more of the epoll file descriptors will receive an event with epoll_wait. The default here is for all those file descriptors to receive an event.

pub const fn empty() -> EventSet[src]

Returns an empty set of flags

pub const fn all() -> EventSet[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u32[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u32) -> Option<EventSet>[src]

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

pub const fn from_bits_truncate(bits: u32) -> EventSet[src]

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

pub const unsafe fn from_bits_unchecked(bits: u32) -> EventSet[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: EventSet) -> bool[src]

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

pub const fn contains(&self, other: EventSet) -> bool[src]

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

pub fn insert(&mut self, other: EventSet)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: EventSet)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: EventSet)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: EventSet, value: bool)[src]

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

Trait Implementations

impl Binary for EventSet[src]

impl BitAnd<EventSet> for EventSet[src]

type Output = EventSet

The resulting type after applying the & operator.

fn bitand(self, other: EventSet) -> EventSet[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<EventSet> for EventSet[src]

fn bitand_assign(&mut self, other: EventSet)[src]

Disables all flags disabled in the set.

impl BitOr<EventSet> for EventSet[src]

type Output = EventSet

The resulting type after applying the | operator.

fn bitor(self, other: EventSet) -> EventSet[src]

Returns the union of the two sets of flags.

impl BitOrAssign<EventSet> for EventSet[src]

fn bitor_assign(&mut self, other: EventSet)[src]

Adds the set of flags.

impl BitXor<EventSet> for EventSet[src]

type Output = EventSet

The resulting type after applying the ^ operator.

fn bitxor(self, other: EventSet) -> EventSet[src]

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

impl BitXorAssign<EventSet> for EventSet[src]

fn bitxor_assign(&mut self, other: EventSet)[src]

Toggles the set of flags.

impl Clone for EventSet[src]

impl Copy for EventSet[src]

impl Debug for EventSet[src]

impl Eq for EventSet[src]

impl Extend<EventSet> for EventSet[src]

impl FromIterator<EventSet> for EventSet[src]

impl Hash for EventSet[src]

impl LowerHex for EventSet[src]

impl Not for EventSet[src]

type Output = EventSet

The resulting type after applying the ! operator.

fn not(self) -> EventSet[src]

Returns the complement of this set of flags.

impl Octal for EventSet[src]

impl Ord for EventSet[src]

impl PartialEq<EventSet> for EventSet[src]

impl PartialOrd<EventSet> for EventSet[src]

impl StructuralEq for EventSet[src]

impl StructuralPartialEq for EventSet[src]

impl Sub<EventSet> for EventSet[src]

type Output = EventSet

The resulting type after applying the - operator.

fn sub(self, other: EventSet) -> EventSet[src]

Returns the set difference of the two sets of flags.

impl SubAssign<EventSet> for EventSet[src]

fn sub_assign(&mut self, other: EventSet)[src]

Disables all flags enabled in the set.

impl UpperHex for EventSet[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.