Enum stun_coder::MessageEncodeError[][src]

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

IO error when writing a field value

Tuple Fields of WriteFailure

0: Error
HeaderEncodeFailure

Failure to encode the STUN header section.

Tuple Fields of HeaderEncodeFailure

0: HeaderEncodeError
AttributeEncodeFailure

Failure to encode a STUN attribute

Tuple Fields of AttributeEncodeFailure

0: AttributeEncodeError
IntegrityKeyGenerationFailure

Failure to generate an integrity verification key

Tuple Fields of IntegrityKeyGenerationFailure

0: IntegrityKeyGenerationError
IncorrectFingerprintAttributePosition

The Fingerprint attribute is not the last one provided.

Fields of IncorrectFingerprintAttributePosition

attr_count: usize

Amount of provided attributes

fingerprint_attr_idx: usize

Index of the Fingerprint attribute

AttributeAfterIntegrity

An attribute was added after the MessageIntegrity attribute. Only a single Fingerprint attribute can be added after it.

Tuple Fields of AttributeAfterIntegrity

MissingIntegrityPassword

A placeholder MessageIntegrity attribute was set, but no integrity_key argument was provided to the encode function making the HMAC computation impossible.

Tuple Fields of MissingIntegrityPassword

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.