Enum stun_coder::AttributeEncodeError
source · [−]pub enum AttributeEncodeError {
WriteFailure(Error),
Utf8ValueTooBig {
limit: usize,
length: usize,
},
}
Expand description
Attribute decoding errors.
Variants
WriteFailure(Error)
Error writing field value.
Utf8ValueTooBig
Fields
limit: usize
The size limit specified in RFC
length: usize
The current length of the encoded value
The encoded UTF-8 value crosses the size limit for the field. The REALM, SERVER, reason phrases, and NONCE are limited to 127 characters (763 bytes). USERNAME to 513 bytes.
Trait Implementations
sourceimpl Debug for AttributeEncodeError
impl Debug for AttributeEncodeError
sourceimpl Display for AttributeEncodeError
impl Display for AttributeEncodeError
sourceimpl Error for AttributeEncodeError
impl Error for AttributeEncodeError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<AttributeEncodeError> for MessageEncodeError
impl From<AttributeEncodeError> for MessageEncodeError
sourcefn from(source: AttributeEncodeError) -> Self
fn from(source: AttributeEncodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for AttributeEncodeError
impl Send for AttributeEncodeError
impl Sync for AttributeEncodeError
impl Unpin for AttributeEncodeError
impl !UnwindSafe for AttributeEncodeError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more