pub enum Event {
Accepted {
key: u64,
socket: Socket,
peer: Option<SocketAddr>,
},
Data {
key: u64,
buf: Vec<u8>,
},
Eof {
key: u64,
},
Error {
key: u64,
error: Error,
},
Sent {
key: u64,
buf: OutBuf,
},
Datagram {
key: u64,
buf: Vec<u8>,
meta: RecvMeta,
},
Closed {
key: u64,
},
Wake,
}Expand description
Something that happened, reported by Driver::turn.
Variants§
Accepted
A listener accepted a connection. The socket is non-blocking and not yet registered.
Data
Bytes arrived on a stream: buf[..] holds them (buf.len() > 0).
Eof
The peer closed its sending side. Receiving stops; sending may continue.
Error
A receive, send or accept failed. The connection should be closed.
Sent
A buffer was written completely (or discarded because the connection failed or closed).
Datagram
A datagram (or a GRO batch) arrived on a UDP socket.
Closed
A socket given to Driver::close is closed and the driver holds nothing of it.
Wake
A Waker was triggered.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin 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