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
Performs the conversion.
Performs the conversion.