pub enum ServerEvent {
ClientConnected {
client_index: usize,
},
ClientDisconnected {
client_index: usize,
reason: DisconnectReason,
},
}Expand description
A connection event on the server, drained with Server::next_event.
Variants§
ClientConnected
A client connected.
ClientDisconnected
A client disconnected.
Fields
§
client_index: usizeThe slot the client occupied. It is free again by the time this event is observed.
§
reason: DisconnectReasonWhy the client was disconnected.
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Source§fn clone(&self) -> ServerEvent
fn clone(&self) -> ServerEvent
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 moreimpl Copy for ServerEvent
Source§impl Debug for ServerEvent
impl Debug for ServerEvent
impl Eq for ServerEvent
Source§impl PartialEq for ServerEvent
impl PartialEq for ServerEvent
impl StructuralPartialEq for ServerEvent
Auto Trait Implementations§
impl Freeze for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnsafeUnpin for ServerEvent
impl UnwindSafe for ServerEvent
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