pub struct PasswordAlgorithms { /* private fields */ }
Expand description
The PasswordAlgorithms
attribute may be present in requests and
responses. It contains the list of algorithms that the server can
use to derive the long-term password.
§Examples
// Creates an empty password algorithms attribute
let mut attr = PasswordAlgorithms::default();
assert_eq!(attr.iter().count(), 0);
// Adds a password algorithm attribute
attr.add(PasswordAlgorithm::new(Algorithm::from(AlgorithmId::MD5)));
assert_eq!(attr.iter().count(), 1);
Implementations§
source§impl PasswordAlgorithms
impl PasswordAlgorithms
sourcepub fn add(&mut self, algorithm: PasswordAlgorithm)
pub fn add(&mut self, algorithm: PasswordAlgorithm)
Adds a new password algorithm.
sourcepub fn password_algorithms(&self) -> &[PasswordAlgorithm]
pub fn password_algorithms(&self) -> &[PasswordAlgorithm]
Return the array of password attributes
sourcepub fn iter(&self) -> impl Iterator<Item = &PasswordAlgorithm>
pub fn iter(&self) -> impl Iterator<Item = &PasswordAlgorithm>
Returns an iterator over the passwords attributes.
Trait Implementations§
source§impl Clone for PasswordAlgorithms
impl Clone for PasswordAlgorithms
source§fn clone(&self) -> PasswordAlgorithms
fn clone(&self) -> PasswordAlgorithms
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 PasswordAlgorithms
impl Debug for PasswordAlgorithms
source§impl Default for PasswordAlgorithms
impl Default for PasswordAlgorithms
source§fn default() -> PasswordAlgorithms
fn default() -> PasswordAlgorithms
Returns the “default value” for a type. Read more
source§impl From<PasswordAlgorithms> for StunAttribute
impl From<PasswordAlgorithms> for StunAttribute
source§fn from(value: PasswordAlgorithms) -> Self
fn from(value: PasswordAlgorithms) -> Self
Converts to this type from the input type.
source§impl From<Vec<PasswordAlgorithm>> for PasswordAlgorithms
impl From<Vec<PasswordAlgorithm>> for PasswordAlgorithms
source§fn from(v: Vec<PasswordAlgorithm>) -> Self
fn from(v: Vec<PasswordAlgorithm>) -> Self
Converts to this type from the input type.
source§impl IntoIterator for PasswordAlgorithms
impl IntoIterator for PasswordAlgorithms
source§impl PartialEq for PasswordAlgorithms
impl PartialEq for PasswordAlgorithms
source§impl StunAttributeType for PasswordAlgorithms
impl StunAttributeType for PasswordAlgorithms
source§fn get_type() -> AttributeTypewhere
Self: Sized,
fn get_type() -> AttributeTypewhere
Self: Sized,
Returns the STUN attribute type.
source§fn attribute_type(&self) -> AttributeType
fn attribute_type(&self) -> AttributeType
Returns the STUN attribute type of this instance.
impl Eq for PasswordAlgorithms
impl StructuralPartialEq for PasswordAlgorithms
Auto Trait Implementations§
impl Freeze for PasswordAlgorithms
impl RefUnwindSafe for PasswordAlgorithms
impl !Send for PasswordAlgorithms
impl !Sync for PasswordAlgorithms
impl Unpin for PasswordAlgorithms
impl UnwindSafe for PasswordAlgorithms
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)