Struct epoll::Events
[−]
pub struct Events { /* fields omitted */ }
Methods
impl Events
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.
const EPOLLIN: Events
EPOLLIN: Events = Events{bits: libc::EPOLLIN as u32,}
The associated file is available for read operations.
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.
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.
const EPOLLOUT: Events
EPOLLOUT: Events = Events{bits: libc::EPOLLOUT as u32,}
The associated file is available for write operations.
const EPOLLPRI: Events
EPOLLPRI: Events = Events{bits: libc::EPOLLPRI as u32,}
There is urgent data available for read operations.
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.
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
.
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.
fn empty() -> Events
Returns an empty set of flags.
fn all() -> Events
Returns the set containing all flags.
fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
fn from_bits(bits: u32) -> Option<Events>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
fn from_bits_truncate(bits: u32) -> Events
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
fn is_all(&self) -> bool
Returns true
if all flags are currently set.
fn intersects(&self, other: Events) -> bool
Returns true
if there are flags common to both self
and other
.
fn contains(&self, other: Events) -> bool
Returns true
all of the flags in other
are contained within self
.
fn insert(&mut self, other: Events)
Inserts the specified flags in-place.
fn remove(&mut self, other: Events)
Removes the specified flags in-place.
fn toggle(&mut self, other: Events)
Toggles the specified flags in-place.
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 PartialEq for Events
fn eq(&self, __arg_0: &Events) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Events) -> bool
This method tests for !=
.
impl Eq for Events
impl Clone for Events
fn clone(&self) -> Events
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd for Events
fn partial_cmp(&self, __arg_0: &Events) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Events) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &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, __arg_0: &Events) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &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
fn cmp(&self, __arg_0: &Events) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for Events
fn hash<__H: Hasher>(&self, __arg_0: &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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Events
impl Binary for Events
impl Octal for Events
impl LowerHex for Events
impl UpperHex for Events
impl BitOr 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 BitOrAssign for Events
fn bitor_assign(&mut self, other: Events)
Adds the set of flags.
impl BitXor 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 BitXorAssign for Events
fn bitxor_assign(&mut self, other: Events)
Toggles the set of flags.
impl BitAnd 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 BitAndAssign for Events
fn bitand_assign(&mut self, other: Events)
Disables all flags disabled in the set.
impl Sub 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 SubAssign 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 Extend<Events> for Events
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
fn from_iter<T: IntoIterator<Item = Events>>(iterator: T) -> Events
Creates a value from an iterator. Read more