Struct stun_codec::rfc5389::attributes::MessageIntegrity
source · pub struct MessageIntegrity { /* private fields */ }
Expand description
MESSAGE-INTEGRITY
attribute.
See RFC 5389 – 15.3. MESSAGE-INTEGRITY about this attribute.
§TODO
- Support SASLprep
Implementations§
source§impl MessageIntegrity
impl MessageIntegrity
sourcepub fn new_short_term_credential<A>(
message: &Message<A>,
password: &str
) -> Result<Self>where
A: Attribute,
pub fn new_short_term_credential<A>(
message: &Message<A>,
password: &str
) -> Result<Self>where
A: Attribute,
Makes a new MessageIntegrity
instance for short-term credentials.
sourcepub fn new_long_term_credential<A>(
message: &Message<A>,
username: &Username,
realm: &Realm,
password: &str
) -> Result<Self>where
A: Attribute,
pub fn new_long_term_credential<A>(
message: &Message<A>,
username: &Username,
realm: &Realm,
password: &str
) -> Result<Self>where
A: Attribute,
Makes a new MessageIntegrity
instance for long-term credentials.
sourcepub fn check_short_term_credential(
&self,
password: &str
) -> Result<(), ErrorCode>
pub fn check_short_term_credential( &self, password: &str ) -> Result<(), ErrorCode>
Checks whether this has the valid short-term credential for password
.
Trait Implementations§
source§impl Attribute for MessageIntegrity
impl Attribute for MessageIntegrity
§type Decoder = MessageIntegrityDecoder
type Decoder = MessageIntegrityDecoder
The decoder of the value part of the attribute.
§type Encoder = MessageIntegrityEncoder
type Encoder = MessageIntegrityEncoder
The encoder of the value part of the attribute.
source§fn get_type(&self) -> AttributeType
fn get_type(&self) -> AttributeType
Returns the type of the attribute.
source§impl Clone for MessageIntegrity
impl Clone for MessageIntegrity
source§fn clone(&self) -> MessageIntegrity
fn clone(&self) -> MessageIntegrity
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 MessageIntegrity
impl Debug for MessageIntegrity
source§impl From<MessageIntegrity> for Attribute
impl From<MessageIntegrity> for Attribute
source§fn from(f: MessageIntegrity) -> Self
fn from(f: MessageIntegrity) -> Self
Converts to this type from the input type.
source§impl Hash for MessageIntegrity
impl Hash for MessageIntegrity
source§impl PartialEq for MessageIntegrity
impl PartialEq for MessageIntegrity
source§fn eq(&self, other: &MessageIntegrity) -> bool
fn eq(&self, other: &MessageIntegrity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryAsRef<MessageIntegrity> for Attribute
impl TryAsRef<MessageIntegrity> for Attribute
source§fn try_as_ref(&self) -> Option<&MessageIntegrity>
fn try_as_ref(&self) -> Option<&MessageIntegrity>
impl Eq for MessageIntegrity
impl StructuralPartialEq for MessageIntegrity
Auto Trait Implementations§
impl Freeze for MessageIntegrity
impl RefUnwindSafe for MessageIntegrity
impl Send for MessageIntegrity
impl Sync for MessageIntegrity
impl Unpin for MessageIntegrity
impl UnwindSafe for MessageIntegrity
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