pub enum MessageEncodeError {
WriteFailure(Error),
HeaderEncodeFailure(HeaderEncodeError),
AttributeEncodeFailure(AttributeEncodeError),
IntegrityKeyGenerationFailure(IntegrityKeyGenerationError),
IncorrectFingerprintAttributePosition {
attr_count: usize,
fingerprint_attr_idx: usize,
},
AttributeAfterIntegrity(),
MissingIntegrityPassword(),
}
Expand description
Message decoding errors.
Variants§
WriteFailure(Error)
IO error when writing a field value
HeaderEncodeFailure(HeaderEncodeError)
Failure to encode the STUN header section.
AttributeEncodeFailure(AttributeEncodeError)
Failure to encode a STUN attribute
IntegrityKeyGenerationFailure(IntegrityKeyGenerationError)
Failure to generate an integrity verification key
IncorrectFingerprintAttributePosition
The Fingerprint attribute is not the last one provided.
Fields
AttributeAfterIntegrity()
An attribute was added after the MessageIntegrity attribute. Only a single Fingerprint attribute can be added after it.
MissingIntegrityPassword()
A placeholder MessageIntegrity attribute was set, but no integrity_key
argument was provided to the encode
function making the HMAC computation impossible.
Trait Implementations§
Source§impl Debug for MessageEncodeError
impl Debug for MessageEncodeError
Source§impl Display for MessageEncodeError
impl Display for MessageEncodeError
Source§impl Error for MessageEncodeError
impl Error for MessageEncodeError
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<AttributeEncodeError> for MessageEncodeError
impl From<AttributeEncodeError> for MessageEncodeError
Source§fn from(source: AttributeEncodeError) -> Self
fn from(source: AttributeEncodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for MessageEncodeError
impl From<Error> for MessageEncodeError
Source§impl From<HeaderEncodeError> for MessageEncodeError
impl From<HeaderEncodeError> for MessageEncodeError
Source§fn from(source: HeaderEncodeError) -> Self
fn from(source: HeaderEncodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessageEncodeError
impl !RefUnwindSafe for MessageEncodeError
impl Send for MessageEncodeError
impl Sync for MessageEncodeError
impl Unpin for MessageEncodeError
impl !UnwindSafe for MessageEncodeError
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