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