pub enum AdapterEvent {
ConnectionAccepted {
connection_id: ConnectionId,
remote_addr: ConstrainedAddr,
},
ConnectionEstablished {
connection_id: ConnectionId,
},
DataReceived {
connection_id: ConnectionId,
data: Vec<u8>,
},
ConnectionClosed {
connection_id: ConnectionId,
},
ConnectionError {
connection_id: ConnectionId,
error: String,
},
Transmit {
destination: TransportAddr,
packet: Vec<u8>,
},
}Expand description
Events from the adapter (transport-agnostic)
Variants§
ConnectionAccepted
New incoming connection accepted
ConnectionEstablished
Outbound connection established
Fields
§
connection_id: ConnectionIdConnection ID
DataReceived
Data received on a connection
ConnectionClosed
Connection closed
Fields
§
connection_id: ConnectionIdConnection ID
ConnectionError
Connection error
Transmit
Packet ready to transmit
Trait Implementations§
Source§impl Clone for AdapterEvent
impl Clone for AdapterEvent
Source§fn clone(&self) -> AdapterEvent
fn clone(&self) -> AdapterEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdapterEvent
impl RefUnwindSafe for AdapterEvent
impl Send for AdapterEvent
impl Sync for AdapterEvent
impl Unpin for AdapterEvent
impl UnsafeUnpin for AdapterEvent
impl UnwindSafe for AdapterEvent
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