pub struct ReservationToken(/* private fields */);
Expand description
The ReservationToken
attribute contains a token that uniquely
identifies a relayed transport address being held in reserve by the
server. The server includes this attribute in a success response to
tell the client about the token, and the client includes this
attribute in a subsequent Allocate request to request the server use
that relayed transport address for the allocation.
§Examples
let token = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08];
let attr = ReservationToken::from(token);
assert_eq!(token, attr.token());
Implementations§
Trait Implementations§
source§impl AsRef<[u8]> for ReservationToken
impl AsRef<[u8]> for ReservationToken
source§impl Clone for ReservationToken
impl Clone for ReservationToken
source§fn clone(&self) -> ReservationToken
fn clone(&self) -> ReservationToken
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 ReservationToken
impl Debug for ReservationToken
source§impl From<ReservationToken> for StunAttribute
impl From<ReservationToken> for StunAttribute
source§fn from(value: ReservationToken) -> Self
fn from(value: ReservationToken) -> Self
Converts to this type from the input type.
source§impl PartialEq for ReservationToken
impl PartialEq for ReservationToken
source§impl StunAttributeType for ReservationToken
impl StunAttributeType for ReservationToken
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 ReservationToken
impl StructuralPartialEq for ReservationToken
Auto Trait Implementations§
impl Freeze for ReservationToken
impl RefUnwindSafe for ReservationToken
impl Send for ReservationToken
impl Sync for ReservationToken
impl Unpin for ReservationToken
impl UnwindSafe for ReservationToken
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
)