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 }
Trait Implementations§
source§impl PartialEq for Event
impl PartialEq for Event
impl Copy for Event
impl Eq for Event
impl StructuralEq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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