pub struct Attribute {
pub attr_type: u16,
pub length: u16,
pub value: Vec<u8>,
}Fields§
§attr_type: u16§length: u16§value: Vec<u8>Implementations§
Source§impl Attribute
impl Attribute
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn decode(data: &[u8]) -> Result<Self, StunError>
pub fn decode_xor_mapped_address( &self, transaction_id: &TransactionId, ) -> Result<SocketAddr, StunError>
pub fn decode_mapped_address(&self) -> Result<SocketAddr, StunError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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
Mutably borrows from an owned value. Read more