Enum stun_coder::MessageDecodeError
source · [−]pub enum MessageDecodeError {
ReadFailure(Error),
HeaderDecodeFailure(HeaderDecodeError),
AttributeDecodeFailure {
source: AttributeDecodeError,
transaction_id: [u8; 12],
},
IntegrityKeyGenerationFailure(IntegrityKeyGenerationError),
IncorrectFingerprintAttributePosition {
msg_len: usize,
attr_pos: usize,
},
FingerprintMismatch {
attr_value: u32,
computed_value: u32,
},
MessageIntegrityFail {
attr_value: Vec<u8>,
computed_value: Vec<u8>,
},
}
Expand description
Message encoding errors.
Variants
ReadFailure(Error)
IO error when reading a field value
HeaderDecodeFailure(HeaderDecodeError)
Failure to decode the STUN header section
AttributeDecodeFailure
Failure to decode a STUN attribute
IntegrityKeyGenerationFailure(IntegrityKeyGenerationError)
Failure to generate an integrity verification key
IncorrectFingerprintAttributePosition
Fields
msg_len: usize
STUN message length
attr_pos: usize
Fingerprint attribute position in that message
Fingerprint attribute is not the last one. This can mean that either the provided byte data contains more than only the STUN message, or message integrity has been compromised.
FingerprintMismatch
Stored and calculated fingerprints mismatch. Means that the message integrity has been compromised.
MessageIntegrityFail
The calculated HMAC value doesn’t match with the provided one.
Either the provided integrity_key
is incorrect or the message integrity has been compromised.
Trait Implementations
sourceimpl Debug for MessageDecodeError
impl Debug for MessageDecodeError
sourceimpl Display for MessageDecodeError
impl Display for MessageDecodeError
sourceimpl Error for MessageDecodeError
impl Error for MessageDecodeError
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>
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
use the Display impl or to_string()
sourceimpl From<Error> for MessageDecodeError
impl From<Error> for MessageDecodeError
sourceimpl From<HeaderDecodeError> for MessageDecodeError
impl From<HeaderDecodeError> for MessageDecodeError
sourcefn from(source: HeaderDecodeError) -> Self
fn from(source: HeaderDecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for MessageDecodeError
impl Send for MessageDecodeError
impl Sync for MessageDecodeError
impl Unpin for MessageDecodeError
impl !UnwindSafe for MessageDecodeError
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