pub enum Event {
HandshakeDataReady,
Connected,
ConnectionLost {
reason: ConnectionError,
},
Stream(StreamEvent),
DatagramReceived,
DatagramsUnblocked,
ObservedAddr(SocketAddr),
}
Expand description
Events of interest to the application
Variants§
HandshakeDataReady
The connection’s handshake data is ready
Connected
The connection was successfully established
ConnectionLost
The connection was lost
Emitted if the peer closes the connection or an error is encountered.
Fields
§
reason: ConnectionError
Reason that the connection was closed
Stream(StreamEvent)
Stream events
DatagramReceived
One or more application datagrams have been received
DatagramsUnblocked
One or more application datagrams have been sent after blocking
ObservedAddr(SocketAddr)
Received an observation of our external address from the peer.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Event
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