Struct stun_codec::rfc5766::attributes::RequestedTransport [−][src]
pub struct RequestedTransport(_);
REQUESTED-TRANSPORT
attribute.
See RFC 5766 -- 14.7. REQUESTED-TRANSPORT about this attribute.
Methods
impl RequestedTransport
[src]
impl RequestedTransport
pub const CODEPOINT: u16
CODEPOINT: u16 = 25
The codepoint of the type of the attribute.
pub fn new(protocol: u8) -> Self
[src]
pub fn new(protocol: u8) -> Self
Makes a new RequestedTransport
instance.
pub fn protocol(&self) -> u8
[src]
pub fn protocol(&self) -> u8
Returns the transport protocol requested by the client.
Trait Implementations
impl Debug for RequestedTransport
[src]
impl Debug for RequestedTransport
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RequestedTransport
[src]
impl Clone for RequestedTransport
fn clone(&self) -> RequestedTransport
[src]
fn clone(&self) -> RequestedTransport
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for RequestedTransport
[src]
impl PartialEq for RequestedTransport
fn eq(&self, other: &RequestedTransport) -> bool
[src]
fn eq(&self, other: &RequestedTransport) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RequestedTransport) -> bool
[src]
fn ne(&self, other: &RequestedTransport) -> bool
This method tests for !=
.
impl Eq for RequestedTransport
[src]
impl Eq for RequestedTransport
impl Hash for RequestedTransport
[src]
impl Hash for RequestedTransport
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Attribute for RequestedTransport
[src]
impl Attribute for RequestedTransport
type Decoder = RequestedTransportDecoder
The decoder of the value part of the attribute.
type Encoder = RequestedTransportEncoder
The encoder of the value part of the attribute.
fn get_type(&self) -> AttributeType
[src]
fn get_type(&self) -> AttributeType
Returns the type of the attribute.
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called before encoding the attribute. Read more
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called after decoding the attribute and before being appended to the given message. Read more
impl From<RequestedTransport> for Attribute
[src]
impl From<RequestedTransport> for Attribute
fn from(f: RequestedTransport) -> Self
[src]
fn from(f: RequestedTransport) -> Self
Performs the conversion.
impl TryAsRef<RequestedTransport> for Attribute
[src]
impl TryAsRef<RequestedTransport> for Attribute
fn try_as_ref(&self) -> Option<&RequestedTransport>
[src]
fn try_as_ref(&self) -> Option<&RequestedTransport>
Attempts to convert self
to a reference to T
. Read more
Auto Trait Implementations
impl Send for RequestedTransport
impl Send for RequestedTransport
impl Sync for RequestedTransport
impl Sync for RequestedTransport