pub trait Attribute: Debug {
    fn get_type(&self) -> AttributeType;
    fn length(&self) -> u16;
    fn to_raw(&self) -> RawAttribute;
    fn from_raw(raw: &RawAttribute) -> Result<Self, StunParseError>
    where
        Self: Sized
; }
Expand description

A STUN attribute for use in Messages

Required Methods§

Retrieve the AttributeType of an Attribute

Retrieve the length of an Attribute. This is not the padded length as stored in a Message

Convert an Attribute to a RawAttribute

Convert an Attribute from a RawAttribute

Implementors§