Enum renet::DisconnectReason
source · pub enum DisconnectReason {
Transport,
DisconnectedByClient,
DisconnectedByServer,
PacketSerialization(SerializationError),
PacketDeserialization(SerializationError),
ReceivedInvalidChannelId(u8),
SendChannelError {
channel_id: u8,
error: ChannelError,
},
ReceiveChannelError {
channel_id: u8,
error: ChannelError,
},
}Expand description
Possibles reasons for a disconnection.
Variants§
Transport
Connection was terminated by the transport layer
DisconnectedByClient
Connection was terminated by the server
DisconnectedByServer
Connection was terminated by the server
PacketSerialization(SerializationError)
Failed to serialize packet
PacketDeserialization(SerializationError)
Failed to deserialize packet
ReceivedInvalidChannelId(u8)
Received message from channel with invalid id
SendChannelError
Error occurred in a send channel
ReceiveChannelError
Error occurred in a receive channel
Trait Implementations§
source§impl Clone for DisconnectReason
impl Clone for DisconnectReason
source§fn clone(&self) -> DisconnectReason
fn clone(&self) -> DisconnectReason
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for DisconnectReason
impl Debug for DisconnectReason
source§impl Display for DisconnectReason
impl Display for DisconnectReason
source§impl From<DisconnectReason> for NetcodeTransportError
impl From<DisconnectReason> for NetcodeTransportError
source§fn from(inner: DisconnectReason) -> Self
fn from(inner: DisconnectReason) -> Self
Converts to this type from the input type.
source§impl PartialEq<DisconnectReason> for DisconnectReason
impl PartialEq<DisconnectReason> for DisconnectReason
source§fn eq(&self, other: &DisconnectReason) -> bool
fn eq(&self, other: &DisconnectReason) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for DisconnectReason
impl Eq for DisconnectReason
impl StructuralEq for DisconnectReason
impl StructuralPartialEq for DisconnectReason
Auto Trait Implementations§
impl RefUnwindSafe for DisconnectReason
impl Send for DisconnectReason
impl Sync for DisconnectReason
impl Unpin 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