Struct stun_types::message::LongTermCredentials
source · pub struct LongTermCredentials { /* private fields */ }Expand description
Structure for holding the required credentials for handling long-term STUN credentials
Implementations§
source§impl LongTermCredentials
impl LongTermCredentials
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 = LongTermCredentials::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");Trait Implementations§
source§impl Clone for LongTermCredentials
impl Clone for LongTermCredentials
source§fn clone(&self) -> LongTermCredentials
fn clone(&self) -> LongTermCredentials
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 LongTermCredentials
impl Debug for LongTermCredentials
source§impl From<LongTermCredentials> for MessageIntegrityCredentials
impl From<LongTermCredentials> for MessageIntegrityCredentials
source§fn from(value: LongTermCredentials) -> Self
fn from(value: LongTermCredentials) -> Self
Converts to this type from the input type.
source§impl PartialEq for LongTermCredentials
impl PartialEq for LongTermCredentials
source§fn eq(&self, other: &LongTermCredentials) -> bool
fn eq(&self, other: &LongTermCredentials) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for LongTermCredentials
impl StructuralPartialEq for LongTermCredentials
Auto Trait Implementations§
impl Freeze for LongTermCredentials
impl RefUnwindSafe for LongTermCredentials
impl Send for LongTermCredentials
impl Sync for LongTermCredentials
impl Unpin for LongTermCredentials
impl UnwindSafe for LongTermCredentials
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)