pub struct RequestedTrasport(/* private fields */);
Expand description
This attribute is used by the client to request a specific transport
§Examples
let attr = RequestedTrasport::from(protocols::UDP);
assert_eq!(attr.protocol(), protocols::UDP);
Implementations§
source§impl RequestedTrasport
impl RequestedTrasport
sourcepub fn new(protocol: ProtocolNumber) -> Self
pub fn new(protocol: ProtocolNumber) -> Self
Creates a new attribute.
§Arguments:
protocol
- The protocol specifies the desired protocol. The code points used in this field are taken from those allowed in the Protocol field in the IPv4 header and the Next Header field in the IPv6 header PROTOCOL-NUMBERS. This specification only allows the use of code point 17 (User Datagram Protocol).
sourcepub fn protocol(&self) -> ProtocolNumber
pub fn protocol(&self) -> ProtocolNumber
Returns the protocol number.
Trait Implementations§
source§impl Clone for RequestedTrasport
impl Clone for RequestedTrasport
source§fn clone(&self) -> RequestedTrasport
fn clone(&self) -> RequestedTrasport
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 RequestedTrasport
impl Debug for RequestedTrasport
source§impl Default for RequestedTrasport
impl Default for RequestedTrasport
source§impl From<ProtocolNumber> for RequestedTrasport
impl From<ProtocolNumber> for RequestedTrasport
source§fn from(value: ProtocolNumber) -> Self
fn from(value: ProtocolNumber) -> Self
Converts to this type from the input type.
source§impl From<RequestedTrasport> for StunAttribute
impl From<RequestedTrasport> for StunAttribute
source§fn from(value: RequestedTrasport) -> Self
fn from(value: RequestedTrasport) -> Self
Converts to this type from the input type.
source§impl PartialEq for RequestedTrasport
impl PartialEq for RequestedTrasport
source§impl StunAttributeType for RequestedTrasport
impl StunAttributeType for RequestedTrasport
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 RequestedTrasport
impl StructuralPartialEq for RequestedTrasport
Auto Trait Implementations§
impl Freeze for RequestedTrasport
impl RefUnwindSafe for RequestedTrasport
impl Send for RequestedTrasport
impl Sync for RequestedTrasport
impl Unpin for RequestedTrasport
impl UnwindSafe for RequestedTrasport
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
)