Skip to main content

Attribute

Trait Attribute 

Source
pub trait Attribute:
    Debug
    + Sync
    + Send {
    // Required methods
    fn get_type(&self) -> AttributeType;
    fn length(&self) -> u16;
}
Expand description

A STUN attribute for use in Messages.

Required Methods§

Source

fn get_type(&self) -> AttributeType

Retrieve the type of an Attribute.

Source

fn length(&self) -> u16

Retrieve the length of an Attribute. This is not the padded length as stored in a Message and does not include the size of the attribute header.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§