pub enum NaiaClientError {
Message(String),
Wrapped(Box<dyn Error + Send>),
SendError,
RecvError,
IdError(u16),
MessageQueueFull,
}Expand description
Errors that can be returned by the naia client.
Returned by methods such as Client::send_message and the
packet-processing loop when an unrecoverable transport or protocol
condition is encountered.
Variants§
Message(String)
A general descriptive error message.
Wrapped(Box<dyn Error + Send>)
An error from an underlying layer, boxed for type erasure.
SendError
A packet could not be sent to the server.
RecvError
A packet could not be read from the socket.
IdError(u16)
A numeric entity or message identifier was malformed or out of range.
MessageQueueFull
The target channel’s send queue is at capacity. The message was not
queued. The caller may retry on the next tick or discard the message.
Configure [ReliableSettings::max_queue_depth] to adjust the limit.
Implementations§
Source§impl NaiaClientError
impl NaiaClientError
Sourcepub fn from_message(message: &str) -> Self
pub fn from_message(message: &str) -> Self
Constructs a Message variant from a string slice.
Trait Implementations§
Source§impl Debug for NaiaClientError
impl Debug for NaiaClientError
Source§impl Display for NaiaClientError
impl Display for NaiaClientError
Source§impl Error for NaiaClientError
impl Error for NaiaClientError
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()
impl Send for NaiaClientError
impl Sync for NaiaClientError
Auto Trait Implementations§
impl Freeze for NaiaClientError
impl !RefUnwindSafe for NaiaClientError
impl Unpin for NaiaClientError
impl UnsafeUnpin for NaiaClientError
impl !UnwindSafe for NaiaClientError
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