pub struct MobilityTicket(/* private fields */);
Expand description
The MobilityTicket
attribute is used in order to retain an
allocation on the TURN server. It is exchanged between the client
and server to aid mobility. The value of the MOBILITY-TICKET is
encrypted and is of variable length.
§Examples
// Create a mobility-ticket attribute using an opaque value
let attr = MobilityTicket::new([0x1, 0x2, 0x3, 0x4, 0x5]);
assert_eq!(attr.value().len(), 5);
assert_eq!(attr, [0x1, 0x2, 0x3, 0x4, 0x5]);
Implementations§
source§impl MobilityTicket
impl MobilityTicket
sourcepub fn new<T>(ticket: T) -> Self
pub fn new<T>(ticket: T) -> Self
Creates a new MobilityTicket
attribute.
§Arguments
ticket
: The ticket
§Returns
The MobilityTicket
attribute
sourcepub fn value(&self) -> &[u8] ⓘ
pub fn value(&self) -> &[u8] ⓘ
Returns the value of the MobilityTicket
attribute
Trait Implementations§
source§impl AsRef<[u8]> for MobilityTicket
impl AsRef<[u8]> for MobilityTicket
source§impl Clone for MobilityTicket
impl Clone for MobilityTicket
source§fn clone(&self) -> MobilityTicket
fn clone(&self) -> MobilityTicket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MobilityTicket
impl Debug for MobilityTicket
source§impl From<&[u8]> for MobilityTicket
impl From<&[u8]> for MobilityTicket
source§impl From<MobilityTicket> for StunAttribute
impl From<MobilityTicket> for StunAttribute
source§fn from(value: MobilityTicket) -> Self
fn from(value: MobilityTicket) -> Self
Converts to this type from the input type.
source§impl PartialEq for MobilityTicket
impl PartialEq for MobilityTicket
source§impl StunAttributeType for MobilityTicket
impl StunAttributeType for MobilityTicket
source§fn get_type() -> AttributeTypewhere
Self: Sized,
fn get_type() -> AttributeTypewhere
Self: Sized,
Returns the STUN attribute type.
source§fn attribute_type(&self) -> AttributeType
fn attribute_type(&self) -> AttributeType
Returns the STUN attribute type of this instance.
impl Eq for MobilityTicket
impl StructuralPartialEq for MobilityTicket
Auto Trait Implementations§
impl Freeze for MobilityTicket
impl RefUnwindSafe for MobilityTicket
impl !Send for MobilityTicket
impl !Sync for MobilityTicket
impl Unpin for MobilityTicket
impl UnwindSafe for MobilityTicket
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)