Struct stun_codec::rfc5389::attributes::Realm [−][src]
pub struct Realm { /* fields omitted */ }
Methods
impl Realm
[src]
impl Realm
pub const CODEPOINT: u16
CODEPOINT: u16 = 20
The codepoint of the type of the attribute.
pub fn new(text: String) -> Result<Self>
[src]
pub fn new(text: String) -> Result<Self>
Makes a new Realm
instance.
Errors
The length of text
must be less than 128
characters.
If it is too long, this will return an ErrorKind::InvalidInput
error.
pub fn text(&self) -> &str
[src]
pub fn text(&self) -> &str
Returns the text of this instance.
Trait Implementations
impl Debug for Realm
[src]
impl Debug for Realm
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 Realm
[src]
impl Clone for Realm
fn clone(&self) -> Realm
[src]
fn clone(&self) -> Realm
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 Realm
[src]
impl PartialEq for Realm
fn eq(&self, other: &Realm) -> bool
[src]
fn eq(&self, other: &Realm) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Realm) -> bool
[src]
fn ne(&self, other: &Realm) -> bool
This method tests for !=
.
impl Eq for Realm
[src]
impl Eq for Realm
impl Hash for Realm
[src]
impl Hash for Realm
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 Realm
[src]
impl Attribute for Realm
type Decoder = RealmDecoder
The decoder of the value part of the attribute.
type Encoder = RealmEncoder
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<Realm> for Attribute
[src]
impl From<Realm> for Attribute
impl TryAsRef<Realm> for Attribute
[src]
impl TryAsRef<Realm> for Attribute
fn try_as_ref(&self) -> Option<&Realm>
[src]
fn try_as_ref(&self) -> Option<&Realm>
Attempts to convert self
to a reference to T
. Read more