pub struct Unknown { /* private fields */ }
Expand description
Unknown attribute.
This attribute is added to a decoded message when there is not a known handler
to decode an attribute. To minimize impact on memory, the data associated to any
unknown attribute is discarded unless the experimental
flag is enabled and
the decoder context had been configured to keep the data associated to unknown
attributes.
Implementations§
Source§impl Unknown
impl Unknown
Sourcepub fn attribute_type(&self) -> AttributeType
pub fn attribute_type(&self) -> AttributeType
Returns the STUN attribute type associated to this unknown attribute.
Sourcepub fn attribute_data(&self) -> Option<&[u8]>
pub fn attribute_data(&self) -> Option<&[u8]>
Returns the raw value associated to this unknown attribute. By default,
no data will be returned to save the amount of memory required to
process unknown attributes. If access to such data is required, it must
be specified by calling the with_unknown_data
on the
DecoderContextBuilder
. This option is only
enabled through the experimental
flag.