#[repr(C)]pub enum DisconnectReason {
Timeout = 0,
Quit = 1,
Kicked = 2,
Custom = 3,
ModeEnd = 4,
}Expand description
Why the server dropped a player (PeerDisconnectReason in network.hpp).
Variants§
Implementations§
Source§impl DisconnectReason
impl DisconnectReason
Sourcepub fn from_raw(value: i32) -> DisconnectReason
pub fn from_raw(value: i32) -> DisconnectReason
Maps the raw value the server passes, treating an unknown one as
DisconnectReason::Custom rather than transmuting it into a variant
that does not exist.
Trait Implementations§
Source§impl Clone for DisconnectReason
impl Clone for DisconnectReason
Source§fn clone(&self) -> DisconnectReason
fn clone(&self) -> DisconnectReason
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 DisconnectReason
Source§impl Debug for DisconnectReason
impl Debug for DisconnectReason
impl Eq for DisconnectReason
Source§impl PartialEq for DisconnectReason
impl PartialEq for DisconnectReason
impl StructuralPartialEq for DisconnectReason
Auto Trait Implementations§
impl Freeze for DisconnectReason
impl RefUnwindSafe for DisconnectReason
impl Send for DisconnectReason
impl Sync for DisconnectReason
impl Unpin for DisconnectReason
impl UnsafeUnpin for DisconnectReason
impl UnwindSafe for DisconnectReason
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