Struct epoll::Events [−]
pub struct Events { /* fields omitted */ }
Methods
impl Events
impl Events
pub const EPOLLET: Events
EPOLLET: Events = Events{bits: libc::EPOLLET as u32,}
Sets the Edge Triggered behavior for the associated file descriptor.
The default behavior for epoll is Level Triggered.
pub const EPOLLIN: Events
EPOLLIN: Events = Events{bits: libc::EPOLLIN as u32,}
The associated file is available for read operations.
pub const EPOLLERR: Events
EPOLLERR: Events = Events{bits: libc::EPOLLERR as u32,}
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
EPOLLHUP: Events = Events{bits: libc::EPOLLHUP as u32,}
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
EPOLLOUT: Events = Events{bits: libc::EPOLLOUT as u32,}
The associated file is available for write operations.
pub const EPOLLPRI: Events
EPOLLPRI: Events = Events{bits: libc::EPOLLPRI as u32,}
There is urgent data available for read operations.
pub const EPOLLRDHUP: Events
EPOLLRDHUP: Events = Events{bits: libc::EPOLLRDHUP as u32,}
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
EPOLLWAKEUP: Events = Events{bits: libc::EPOLLWAKEUP as u32,}
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
EPOLLONESHOT: Events = Events{bits: libc::EPOLLONESHOT as u32,}
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
pub fn empty() -> Events
Returns an empty set of flags.
pub fn all() -> Events
pub fn all() -> Events
Returns the set containing all flags.
pub fn bits(&self) -> u32
pub fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<Events>
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
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
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: Events) -> bool
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
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)
pub fn insert(&mut self, other: Events)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Events)
pub fn remove(&mut self, other: Events)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Events)
pub fn toggle(&mut self, other: Events)
Toggles the specified flags in-place.
pub fn set(&mut self, other: Events, value: bool)
pub fn set(&mut self, other: Events, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for Events
impl Copy for Events
impl PartialEq for Events
impl PartialEq for Events
fn eq(&self, other: &Events) -> bool
fn eq(&self, other: &Events) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Events) -> bool
fn ne(&self, other: &Events) -> bool
This method tests for !=
.
impl Eq for Events
impl Eq for Events
impl Clone for Events
impl Clone for Events
fn clone(&self) -> Events
fn clone(&self) -> Events
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for Events
impl PartialOrd for Events
fn partial_cmp(&self, other: &Events) -> Option<Ordering>
fn partial_cmp(&self, other: &Events) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Events) -> bool
fn lt(&self, other: &Events) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Events) -> bool
fn le(&self, other: &Events) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Events) -> bool
fn gt(&self, other: &Events) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Events) -> bool
fn ge(&self, other: &Events) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Events
impl Ord for Events
fn cmp(&self, other: &Events) -> Ordering
fn cmp(&self, other: &Events) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Events
impl Hash for Events
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Events
impl Debug for Events
impl Binary for Events
impl Binary for Events
impl Octal for Events
impl Octal for Events
impl LowerHex for Events
impl LowerHex for Events
impl UpperHex for Events
impl UpperHex for Events
impl BitOr for Events
impl BitOr for Events
type Output = Events
The resulting type after applying the |
operator.
fn bitor(self, other: Events) -> Events
fn bitor(self, other: Events) -> Events
Returns the union of the two sets of flags.
impl BitOrAssign for Events
impl BitOrAssign for Events
fn bitor_assign(&mut self, other: Events)
fn bitor_assign(&mut self, other: Events)
Adds the set of flags.
impl BitXor for Events
impl BitXor for Events
type Output = Events
The resulting type after applying the ^
operator.
fn bitxor(self, other: Events) -> Events
fn bitxor(self, other: Events) -> Events
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for Events
impl BitXorAssign for Events
fn bitxor_assign(&mut self, other: Events)
fn bitxor_assign(&mut self, other: Events)
Toggles the set of flags.
impl BitAnd for Events
impl BitAnd for Events
type Output = Events
The resulting type after applying the &
operator.
fn bitand(self, other: Events) -> Events
fn bitand(self, other: Events) -> Events
Returns the intersection between the two sets of flags.
impl BitAndAssign for Events
impl BitAndAssign for Events
fn bitand_assign(&mut self, other: Events)
fn bitand_assign(&mut self, other: Events)
Disables all flags disabled in the set.
impl Sub for Events
impl Sub for Events
type Output = Events
The resulting type after applying the -
operator.
fn sub(self, other: Events) -> Events
fn sub(self, other: Events) -> Events
Returns the set difference of the two sets of flags.
impl SubAssign for Events
impl SubAssign for Events
fn sub_assign(&mut self, other: Events)
fn sub_assign(&mut self, other: Events)
Disables all flags enabled in the set.
impl Not for Events
impl Not for Events
type Output = Events
The resulting type after applying the !
operator.
fn not(self) -> Events
fn not(self) -> Events
Returns the complement of this set of flags.
impl Extend<Events> for Events
impl Extend<Events> for Events
fn extend<T: IntoIterator<Item = Events>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Events>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<Events> for Events
impl FromIterator<Events> for Events
fn from_iter<T: IntoIterator<Item = Events>>(iterator: T) -> Events
fn from_iter<T: IntoIterator<Item = Events>>(iterator: T) -> Events
Creates a value from an iterator. Read more