Struct stun_codec::AttributeType [−][src]
Attribute type.
Attributes are divided into two types: comprehension-required and comprehension-optional. STUN agents can safely ignore comprehension-optional attributes they don't understand, but cannot successfully process a message if it contains comprehension-required attributes that are not understood.
A STUN Attribute type is a hex number in the range 0x0000 - 0xFFFF. STUN attribute types in the range 0x0000 - 0x7FFF are considered comprehension-required; STUN attribute types in the range 0x8000 - 0xFFFF are considered comprehension-optional.
Implementations
impl AttributeType
[src]
pub fn new(codepoint: u16) -> Self
[src]
Makes a new Type
instance which corresponding to codepoint
.
pub fn as_u16(self) -> u16
[src]
Returns the attribute codepoint corresponding this instance.
pub fn is_comprehension_required(self) -> bool
[src]
Returns true
if this is a comprehension-required type.
pub fn is_comprehension_optional(self) -> bool
[src]
Returns true
if this is a comprehension-optional type.
Trait Implementations
impl Clone for AttributeType
[src]
fn clone(&self) -> AttributeType
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AttributeType
[src]
impl Debug for AttributeType
[src]
impl Eq for AttributeType
[src]
impl From<u16> for AttributeType
[src]
impl Hash for AttributeType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for AttributeType
[src]
fn cmp(&self, other: &AttributeType) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<AttributeType> for AttributeType
[src]
fn eq(&self, other: &AttributeType) -> bool
[src]
fn ne(&self, other: &AttributeType) -> bool
[src]
impl PartialOrd<AttributeType> for AttributeType
[src]
fn partial_cmp(&self, other: &AttributeType) -> Option<Ordering>
[src]
fn lt(&self, other: &AttributeType) -> bool
[src]
fn le(&self, other: &AttributeType) -> bool
[src]
fn gt(&self, other: &AttributeType) -> bool
[src]
fn ge(&self, other: &AttributeType) -> bool
[src]
impl StructuralEq for AttributeType
[src]
impl StructuralPartialEq for AttributeType
[src]
Auto Trait Implementations
impl RefUnwindSafe for AttributeType
[src]
impl Send for AttributeType
[src]
impl Sync for AttributeType
[src]
impl Unpin for AttributeType
[src]
impl UnwindSafe for AttributeType
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,