Struct rustun::rfc5389::attributes::Username
[−]
[src]
pub struct Username { /* fields omitted */ }
USERNAME
attribute.
See RFC 5389 -- 15.3. USERNAME about this attribute.
TODO
- Support SASLprep [RFC 4013]
Methods
impl Username
[src]
fn new(name: String) -> Option<Self>
Makes a new Username
instance.
The length of name
must be less then 513
bytes.
If it is too long, this will return None
.
fn name(&self) -> &str
Returns the name of this instance.
Trait Implementations
impl Debug for Username
[src]
impl Clone for Username
[src]
fn clone(&self) -> Username
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Username
[src]
fn eq(&self, __arg_0: &Username) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Username) -> bool
This method tests for !=
.
impl Eq for Username
[src]
impl Hash for Username
[src]
fn hash<__H: Hasher>(&self, __arg_0: &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
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Attribute for Username
[src]
fn get_type(&self) -> Type
Returns the attribute type of this instance.
fn try_from_raw(attr: &RawAttribute, _message: &RawMessage) -> Result<Self>
Tries to convert from RawAttribute
. Read more
fn encode_value(&self, _message: &RawMessage) -> Result<Vec<u8>>
Tries to encode the value of this attribute to bytes.
fn try_to_raw(&self, message: &RawMessage) -> Result<RawAttribute>
Tries to convert to RawAttribute
. Read more