pub enum EngineEvent {
ConnectionAccepted {
connection_id: ConnectionId,
remote_addr: SocketAddr,
},
ConnectionEstablished {
connection_id: ConnectionId,
},
DataReceived {
connection_id: ConnectionId,
data: Vec<u8>,
},
ConnectionClosed {
connection_id: ConnectionId,
},
ConnectionError {
connection_id: ConnectionId,
error: String,
},
Transmit {
remote_addr: SocketAddr,
packet: Vec<u8>,
},
}Expand description
Events from the engine
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 EngineEvent
impl Clone for EngineEvent
Source§fn clone(&self) -> EngineEvent
fn clone(&self) -> EngineEvent
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 EngineEvent
impl RefUnwindSafe for EngineEvent
impl Send for EngineEvent
impl Sync for EngineEvent
impl Unpin for EngineEvent
impl UnsafeUnpin for EngineEvent
impl UnwindSafe for EngineEvent
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