pub enum NetcodeError {
Show 16 variants
UnavailablePrivateKey,
InvalidPacketType,
InvalidProtocolID,
InvalidVersion,
PacketTooSmall,
PayloadAboveLimit,
DuplicatedSequence,
NoMoreServers,
Expired,
Disconnected(DisconnectReason),
CryptoError,
NotInHostList,
ClientNotFound,
ClientNotConnected,
IoError(Error),
TokenGenerationError(TokenGenerationError),
}
Expand description
Errors from the renetcode crate.
Variants§
No private keys was available while decrypting.
InvalidPacketType
The type of the packet is invalid.
InvalidProtocolID
The connect token has an invalid protocol id.
InvalidVersion
The connect token has an invalid version.
PacketTooSmall
Packet size is too small to be a netcode packet.
PayloadAboveLimit
Payload is above the maximum limit
DuplicatedSequence
The processed packet is duplicated
NoMoreServers
No more host are available in the connect token..
Expired
The connect token has expired.
Disconnected(DisconnectReason)
The client is disconnected.
CryptoError
An error ocurred while encrypting or decrypting.
NotInHostList
The server address is not in the connect token.
ClientNotFound
Client was not found.
ClientNotConnected
Client is not connected.
IoError(Error)
IO error.
TokenGenerationError(TokenGenerationError)
An error occured while generating the connect token.
Trait Implementations§
Source§impl Debug for NetcodeError
impl Debug for NetcodeError
Source§impl Display for NetcodeError
impl Display for NetcodeError
Source§impl Error for NetcodeError
impl Error for NetcodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for NetcodeError
impl From<Error> for NetcodeError
Source§impl From<Error> for NetcodeError
impl From<Error> for NetcodeError
Source§fn from(_: CryptoError) -> Self
fn from(_: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<TokenGenerationError> for NetcodeError
impl From<TokenGenerationError> for NetcodeError
Source§fn from(inner: TokenGenerationError) -> Self
fn from(inner: TokenGenerationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NetcodeError
impl !RefUnwindSafe for NetcodeError
impl Send for NetcodeError
impl Sync for NetcodeError
impl Unpin for NetcodeError
impl !UnwindSafe for NetcodeError
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