pub struct Event {
pub key: usize,
pub readable: bool,
pub writable: bool,
}
Expand description
Indicates that a file descriptor or socket can read or write without blocking.
Fields§
§key: usize
Key identifying the file descriptor or socket.
readable: bool
Can it do a read operation without blocking?
writable: bool
Can it do a write operation without blocking?
Implementations§
source§impl Event
impl Event
sourcepub fn all(key: usize) -> Event
pub fn all(key: usize) -> Event
All kinds of events (readable and writable).
Equivalent to: Event { key, readable: true, writable: true }
sourcepub fn readable(key: usize) -> Event
pub fn readable(key: usize) -> Event
Only the readable event.
Equivalent to: Event { key, readable: true, writable: false }