pub enum DatagramError {
EmptyMessage,
TooLargeMessage,
IncompleteBytes,
BytesParseFail(TryFromSliceError),
}
Expand description
Encountered when there is an issue constructing, serializing, or deserializing a ConnectDatagram
.
Variants§
EmptyMessage
Tried to construct a ConnectDatagram
with an empty message body.
TooLargeMessage
Tried to construct a ConnectDatagram
with a message body larger than 100MB.
IncompleteBytes
Did not provide the complete byte-string necessary to deserialize the ConnectDatagram
.
BytesParseFail(TryFromSliceError)
Wraps a TryFromSliceError
encountered when the version or recipient tags cannot be
parsed from the provided bytes.
Trait Implementations§
Source§impl Clone for DatagramError
impl Clone for DatagramError
Source§fn clone(&self) -> DatagramError
fn clone(&self) -> DatagramError
Returns a duplicate 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 DatagramError
impl Debug for DatagramError
Source§impl Display for DatagramError
impl Display for DatagramError
Source§impl Error for DatagramError
impl Error for DatagramError
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()
Auto Trait Implementations§
impl Freeze for DatagramError
impl RefUnwindSafe for DatagramError
impl Send for DatagramError
impl Sync for DatagramError
impl Unpin for DatagramError
impl UnwindSafe for DatagramError
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