pub struct LongTermKeyCredentials { /* private fields */ }Expand description
Structure for holding the required credentials for signing STUN messages
Implementations§
Source§impl LongTermKeyCredentials
impl LongTermKeyCredentials
Sourcepub fn new(username: String, password: String, realm: String) -> Self
pub fn new(username: String, password: String, realm: String) -> Self
Create a new set of LongTermCredentials
§Examples
let credentials = LongTermKeyCredentials::new(
"user".to_string(),
"pass".to_string(),
"realm".to_string(),
);
assert_eq!(credentials.username(), "user");
assert_eq!(credentials.password(), "pass");
assert_eq!(credentials.realm(), "realm");Sourcepub fn make_key(&self, algorithm: IntegrityAlgorithm) -> IntegrityKey
pub fn make_key(&self, algorithm: IntegrityAlgorithm) -> IntegrityKey
Compute a key for caching purposes.
Trait Implementations§
Source§impl Clone for LongTermKeyCredentials
impl Clone for LongTermKeyCredentials
Source§fn clone(&self) -> LongTermKeyCredentials
fn clone(&self) -> LongTermKeyCredentials
Returns a duplicate 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 LongTermKeyCredentials
impl Debug for LongTermKeyCredentials
Source§impl From<LongTermKeyCredentials> for MessageIntegrityCredentials
impl From<LongTermKeyCredentials> for MessageIntegrityCredentials
Source§fn from(value: LongTermKeyCredentials) -> Self
fn from(value: LongTermKeyCredentials) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LongTermKeyCredentials
impl PartialEq for LongTermKeyCredentials
impl Eq for LongTermKeyCredentials
impl StructuralPartialEq for LongTermKeyCredentials
Auto Trait Implementations§
impl Freeze for LongTermKeyCredentials
impl RefUnwindSafe for LongTermKeyCredentials
impl Send for LongTermKeyCredentials
impl Sync for LongTermKeyCredentials
impl Unpin for LongTermKeyCredentials
impl UnsafeUnpin for LongTermKeyCredentials
impl UnwindSafe for LongTermKeyCredentials
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