#[non_exhaustive]pub enum StunWriteError {
AttributeExists(AttributeType),
FingerprintExists,
MessageIntegrityExists,
TooLarge {
expected: usize,
actual: usize,
},
TooSmall {
expected: usize,
actual: usize,
},
IntegrityFailed,
OutOfRange {
value: usize,
min: usize,
max: usize,
},
}
Expand description
Errors produced when writing a STUN message
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AttributeExists(AttributeType)
The message already has this attribute
FingerprintExists
The fingerprint attribute already exists. Cannot write any further attributes
MessageIntegrityExists
A message integrity attribute already exists. Cannot write any further attributes
TooLarge
The message has been truncated
TooSmall
The message has been truncated
IntegrityFailed
Failed to compute integrity
OutOfRange
Out of range input provided
Trait Implementations§
Source§impl Debug for StunWriteError
impl Debug for StunWriteError
Source§impl Display for StunWriteError
impl Display for StunWriteError
Source§impl Error for StunWriteError
impl Error for StunWriteError
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 StunWriteError
impl RefUnwindSafe for StunWriteError
impl Send for StunWriteError
impl Sync for StunWriteError
impl Unpin for StunWriteError
impl UnwindSafe for StunWriteError
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