#[non_exhaustive]pub enum PollMode {
Oneshot,
Level,
Edge,
EdgeOneshot,
}
Expand description
The mode in which the poller waits for I/O events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Oneshot
Poll in oneshot mode.
In this mode, the poller will only deliver one event per file descriptor or socket.
Once an event has been delivered, interest in the event needs to be re-enabled
by calling Poller::modify
or Poller::add
.
This is the default mode.
Level
Poll in level-triggered mode.
Once an event has been delivered, polling will continue to deliver that event
until interest in the event is disabled by calling Poller::modify
or Poller::delete
.
Not all operating system support this mode. Trying to register a file descriptor with
this mode in an unsupported operating system will raise an error. You can check if
the operating system supports this mode by calling Poller::supports_level
.
Edge
Poll in edge-triggered mode.
Once an event has been delivered, polling will not deliver that event again unless a new event occurs.
Not all operating system support this mode. Trying to register a file descriptor with
this mode in an unsupported operating system will raise an error. You can check if
the operating system supports this mode by calling Poller::supports_edge
.
EdgeOneshot
Poll in both edge-triggered and oneshot mode.
This mode is similar to the Oneshot
mode, but it will only deliver one event per new
event.
Not all operating system support this mode. Trying to register a file descriptor with
this mode in an unsupported operating system will raise an error. You can check if
the operating system supports this mode by calling Poller::supports_edge
.
Trait Implementations§
source§impl Ord for PollMode
impl Ord for PollMode
source§impl PartialEq for PollMode
impl PartialEq for PollMode
source§impl PartialOrd for PollMode
impl PartialOrd for PollMode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more