#[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 PartialOrd for PollMode
impl PartialOrd for PollMode
impl Copy for PollMode
impl Eq for PollMode
impl StructuralPartialEq for PollMode
Auto Trait Implementations§
impl Freeze for PollMode
impl RefUnwindSafe for PollMode
impl Send for PollMode
impl Sync for PollMode
impl Unpin for PollMode
impl UnwindSafe for PollMode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)