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.
Trait Implementations§
source§impl From<Unknown> for StunAttribute
impl From<Unknown> for StunAttribute
impl Eq for Unknown
impl StructuralPartialEq for Unknown
Auto Trait Implementations§
impl Freeze for Unknown
impl RefUnwindSafe for Unknown
impl !Send for Unknown
impl !Sync for Unknown
impl Unpin for Unknown
impl UnwindSafe for Unknown
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)