pub struct RequestedAddressFamily(/* private fields */);
Expand description
This attribute is used in Allocate and Refresh requests to specify the address type requested by the client
§Examples
let attr = RequestedAddressFamily::new(AddressFamily::IPv4);
assert_eq!(attr.family(), AddressFamily::IPv4);
Implementations§
source§impl RequestedAddressFamily
impl RequestedAddressFamily
sourcepub fn new(family: AddressFamily) -> Self
pub fn new(family: AddressFamily) -> Self
sourcepub fn family(&self) -> AddressFamily
pub fn family(&self) -> AddressFamily
Gets the address family
Trait Implementations§
source§impl Clone for RequestedAddressFamily
impl Clone for RequestedAddressFamily
source§fn clone(&self) -> RequestedAddressFamily
fn clone(&self) -> RequestedAddressFamily
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 RequestedAddressFamily
impl Debug for RequestedAddressFamily
source§impl From<AddressFamily> for RequestedAddressFamily
impl From<AddressFamily> for RequestedAddressFamily
source§fn from(family: AddressFamily) -> Self
fn from(family: AddressFamily) -> Self
Converts to this type from the input type.
source§impl From<RequestedAddressFamily> for StunAttribute
impl From<RequestedAddressFamily> for StunAttribute
source§fn from(value: RequestedAddressFamily) -> Self
fn from(value: RequestedAddressFamily) -> Self
Converts to this type from the input type.
source§impl<T> From<T> for RequestedAddressFamily
impl<T> From<T> for RequestedAddressFamily
source§impl PartialEq for RequestedAddressFamily
impl PartialEq for RequestedAddressFamily
source§impl StunAttributeType for RequestedAddressFamily
impl StunAttributeType for RequestedAddressFamily
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 RequestedAddressFamily
impl StructuralPartialEq for RequestedAddressFamily
Auto Trait Implementations§
impl Freeze for RequestedAddressFamily
impl RefUnwindSafe for RequestedAddressFamily
impl Send for RequestedAddressFamily
impl Sync for RequestedAddressFamily
impl Unpin for RequestedAddressFamily
impl UnwindSafe for RequestedAddressFamily
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
)