Enum stun_coder::MessageEncodeError
source · [−]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
Fields
attr_count: usize
Amount of provided attributes
fingerprint_attr_idx: usize
Index of the Fingerprint attribute
The Fingerprint attribute is not the last one provided.
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
sourceimpl Debug for MessageEncodeError
impl Debug for MessageEncodeError
sourceimpl Display for MessageEncodeError
impl Display for MessageEncodeError
sourceimpl Error for MessageEncodeError
impl Error for MessageEncodeError
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<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.
sourceimpl From<Error> for MessageEncodeError
impl From<Error> for MessageEncodeError
sourceimpl From<HeaderEncodeError> for MessageEncodeError
impl From<HeaderEncodeError> for MessageEncodeError
sourcefn from(source: HeaderEncodeError) -> Self
fn from(source: HeaderEncodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for MessageEncodeError
impl Send for MessageEncodeError
impl Sync for MessageEncodeError
impl Unpin for MessageEncodeError
impl !UnwindSafe for MessageEncodeError
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