pub enum Mode {
OneShot,
Level,
Edge,
}
Expand description
Possible modes for registering a file descriptor
Variants§
OneShot
Single event generation
This FD will be disabled as soon as it has generated one event.
The user will need to use LoopHandle::update()
to re-enable it if
desired.
Level
Level-triggering
This FD will report events on every poll as long as the requested interests are available.
Edge
Edge-triggering
This FD will report events only when it gains one of the requested interests. it must thus be fully processed before it’ll generate events again.
This mode is not supported on certain platforms, and an error will be returned if it is used.
§Supported Platforms
As of the time of writing, the platforms that support edge triggered polling are as follows:
- Linux/Android
- macOS/iOS/tvOS/watchOS
- FreeBSD/OpenBSD/NetBSD/DragonflyBSD
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)