pub struct LifeTime(/* private fields */);
Expand description
The LifeTime
attribute represents the duration for which the server
will maintain an allocation in the absence of a refresh. The TURN
client can include the LIFETIME attribute with the desired lifetime
in Allocate and Refresh requests. The value portion of this
attribute is 4 bytes long and consists of a 32-bit unsigned integral
value representing the number of seconds remaining until expiration.
§Examples
let attr = LifeTime::from(1234);
assert_eq!(attr, 1234);
Implementations§
Trait Implementations§
source§impl From<LifeTime> for StunAttribute
impl From<LifeTime> for StunAttribute
source§impl Ord for LifeTime
impl Ord for LifeTime
source§impl PartialOrd<LifeTime> for u32
impl PartialOrd<LifeTime> for u32
source§impl PartialOrd<u32> for LifeTime
impl PartialOrd<u32> for LifeTime
source§impl PartialOrd for LifeTime
impl PartialOrd for LifeTime
source§impl StunAttributeType for LifeTime
impl StunAttributeType for LifeTime
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 Copy for LifeTime
impl Eq for LifeTime
impl StructuralPartialEq for LifeTime
Auto Trait Implementations§
impl Freeze for LifeTime
impl RefUnwindSafe for LifeTime
impl Send for LifeTime
impl Sync for LifeTime
impl Unpin for LifeTime
impl UnwindSafe for LifeTime
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
)