[−][src]Struct epoll::Events
Implementations
impl Events
[src]
pub const EPOLLET: Events
[src]
Sets the Edge Triggered behavior for the associated file descriptor.
The default behavior for epoll is Level Triggered.
pub const EPOLLIN: Events
[src]
The associated file is available for read operations.
pub const EPOLLERR: Events
[src]
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
[src]
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
[src]
The associated file is available for write operations.
pub const EPOLLPRI: Events
[src]
There is urgent data available for read operations.
pub const EPOLLRDHUP: Events
[src]
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
[src]
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
[src]
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 const EPOLLEXCLUSIVE: Events
[src]
Sets an exclusive wakeup mode for the epoll file descriptor that is being attached to
the target file descriptor, fd
. When a wakeup event occurs and multiple epoll file
descriptors are attached to the same target file using EPOLLEXCLUSIVE
, one or more of
the epoll file descriptors will receive an event with wait
. The default in this
scenario (when EPOLLEXCLUSIVE
is not set) is for all epoll file descriptors to
receive an event. EPOLLEXCLUSIVE
is thus useful for avoiding thundering herd problems
in certain scenarios.
If the same file descriptor is in multiple epoll instances, some with the
EPOLLEXCLUSIVE
flag, and others without, then events will be provided to all epoll
instances that did not specify EPOLLEXCLUSIVE
, and at least one of the epoll
instances that did specify EPOLLEXCLUSIVE
.
The following values may be specified in conjunction with EPOLLEXCLUSIVE
: EPOLLIN
,
EPOLLOUT
, EPOLLWAKEUP
, and EPOLLET
. EPOLLHUP
and EPOLLERR
can also be
specified, but this is not required: as usual, these events are always reported if they
occur, regardless of whether they are specified in Events
. Attempts to specify other
values in Events
yield the error EINVAL
.
EPOLLEXCLUSIVE
may be used only in an EPOLL_CTL_ADD
operation; attempts to employ
it with EPOLL_CTL_MOD
yield an error. If EPOLLEXCLUSIVE
has been set using ctl
,
then a subsequent EPOLL_CTL_MOD
on the same epfd
, fd
pair yields an error. A call
to ctl
that specifies EPOLLEXCLUSIVE
in Events
and specifies the target file
descriptor fd
as an epoll instance will likewise fail. The error in all of these
cases is EINVAL
.
The EPOLLEXCLUSIVE
flag is an input flag for the Event.events
field when calling
ctl
; it is never returned by wait
.
pub const fn empty() -> Events
[src]
Returns an empty set of flags
pub const fn all() -> Events
[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<Events>
[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) -> Events
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> Events
[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: Events) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: Events) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Events)
[src]
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Events)
[src]
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Events)
[src]
Toggles the specified flags in-place.
pub fn set(&mut self, other: Events, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for Events
[src]
impl BitAnd<Events> for Events
[src]
type Output = Events
The resulting type after applying the &
operator.
fn bitand(self, other: Events) -> Events
[src]
Returns the intersection between the two sets of flags.
impl BitAndAssign<Events> for Events
[src]
fn bitand_assign(&mut self, other: Events)
[src]
Disables all flags disabled in the set.
impl BitOr<Events> for Events
[src]
type Output = Events
The resulting type after applying the |
operator.
fn bitor(self, other: Events) -> Events
[src]
Returns the union of the two sets of flags.
impl BitOrAssign<Events> for Events
[src]
fn bitor_assign(&mut self, other: Events)
[src]
Adds the set of flags.
impl BitXor<Events> for Events
[src]
type Output = Events
The resulting type after applying the ^
operator.
fn bitxor(self, other: Events) -> Events
[src]
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign<Events> for Events
[src]
fn bitxor_assign(&mut self, other: Events)
[src]
Toggles the set of flags.
impl Clone for Events
[src]
impl Copy for Events
[src]
impl Debug for Events
[src]
impl Eq for Events
[src]
impl Extend<Events> for Events
[src]
fn extend<T: IntoIterator<Item = Events>>(&mut self, iterator: T)
[src]
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl FromIterator<Events> for Events
[src]
fn from_iter<T: IntoIterator<Item = Events>>(iterator: T) -> Events
[src]
impl Hash for Events
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for Events
[src]
impl Not for Events
[src]
type Output = Events
The resulting type after applying the !
operator.
fn not(self) -> Events
[src]
Returns the complement of this set of flags.
impl Octal for Events
[src]
impl Ord for Events
[src]
fn cmp(&self, other: &Events) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Events> for Events
[src]
impl PartialOrd<Events> for Events
[src]
fn partial_cmp(&self, other: &Events) -> Option<Ordering>
[src]
fn lt(&self, other: &Events) -> bool
[src]
fn le(&self, other: &Events) -> bool
[src]
fn gt(&self, other: &Events) -> bool
[src]
fn ge(&self, other: &Events) -> bool
[src]
impl StructuralEq for Events
[src]
impl StructuralPartialEq for Events
[src]
impl Sub<Events> for Events
[src]
type Output = Events
The resulting type after applying the -
operator.
fn sub(self, other: Events) -> Events
[src]
Returns the set difference of the two sets of flags.
impl SubAssign<Events> for Events
[src]
fn sub_assign(&mut self, other: Events)
[src]
Disables all flags enabled in the set.
impl UpperHex for Events
[src]
Auto Trait Implementations
impl RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnwindSafe for Events
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,