Struct stun_codec::RawAttribute [−][src]
pub struct RawAttribute { /* fields omitted */ }
An Attribute
implementation that has raw value bytes.
Methods
impl RawAttribute
[src]
impl RawAttribute
pub fn new(attr_type: AttributeType, value: Vec<u8>) -> Self
[src]
pub fn new(attr_type: AttributeType, value: Vec<u8>) -> Self
Makes a new RawAttribute
instance.
pub fn value(&self) -> &[u8]
[src]
pub fn value(&self) -> &[u8]
Returns a reference to the value bytes of the attribute.
pub fn into_value(self) -> Vec<u8>
[src]
pub fn into_value(self) -> Vec<u8>
Takes ownership of this instance, and returns the value bytes.
Trait Implementations
impl Debug for RawAttribute
[src]
impl Debug for RawAttribute
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RawAttribute
[src]
impl Clone for RawAttribute
fn clone(&self) -> RawAttribute
[src]
fn clone(&self) -> RawAttribute
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Attribute for RawAttribute
[src]
impl Attribute for RawAttribute
type Decoder = RawAttributeDecoder
The decoder of the value part of the attribute.
type Encoder = RawAttributeEncoder
The encoder of the value part of the attribute.
fn get_type(&self) -> AttributeType
[src]
fn get_type(&self) -> AttributeType
Returns the type of the attribute.
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called before encoding the attribute. Read more
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called after decoding the attribute and before being appended to the given message. Read more
Auto Trait Implementations
impl Send for RawAttribute
impl Send for RawAttribute
impl Sync for RawAttribute
impl Sync for RawAttribute