Struct stun_rs::attributes::stun::PasswordAlgorithms
source · [−]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
sourceimpl 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
sourceimpl Debug for PasswordAlgorithms
impl Debug for PasswordAlgorithms
sourceimpl Default for PasswordAlgorithms
impl Default for PasswordAlgorithms
sourcefn default() -> PasswordAlgorithms
fn default() -> PasswordAlgorithms
Returns the “default value” for a type. Read more
sourceimpl From<PasswordAlgorithms> for StunAttribute
impl From<PasswordAlgorithms> for StunAttribute
sourcefn from(value: PasswordAlgorithms) -> Self
fn from(value: PasswordAlgorithms) -> Self
Converts to this type from the input type.
sourceimpl From<Vec<PasswordAlgorithm, Global>> for PasswordAlgorithms
impl From<Vec<PasswordAlgorithm, Global>> for PasswordAlgorithms
sourcefn from(v: Vec<PasswordAlgorithm>) -> Self
fn from(v: Vec<PasswordAlgorithm>) -> Self
Converts to this type from the input type.
sourceimpl IntoIterator for PasswordAlgorithms
impl IntoIterator for PasswordAlgorithms
type Item = PasswordAlgorithm
type Item = PasswordAlgorithm
The type of the elements being iterated over.
type IntoIter = IntoIter<<PasswordAlgorithms as IntoIterator>::Item, Global>
type IntoIter = IntoIter<<PasswordAlgorithms as IntoIterator>::Item, Global>
Which kind of iterator are we turning this into?
sourceimpl PartialEq<PasswordAlgorithms> for PasswordAlgorithms
impl PartialEq<PasswordAlgorithms> for PasswordAlgorithms
sourcefn eq(&self, other: &PasswordAlgorithms) -> bool
fn eq(&self, other: &PasswordAlgorithms) -> bool
sourceimpl StunAttributeType for PasswordAlgorithms
impl StunAttributeType for PasswordAlgorithms
sourcefn get_type() -> AttributeTypewhere
Self: Sized,
fn get_type() -> AttributeTypewhere
Self: Sized,
Returns the STUN attribute type.
sourcefn attribute_type(&self) -> AttributeType
fn attribute_type(&self) -> AttributeType
Returns the STUN attribute type of this instance.
impl Eq for PasswordAlgorithms
impl StructuralEq for PasswordAlgorithms
impl StructuralPartialEq for PasswordAlgorithms
Auto Trait Implementations
impl RefUnwindSafe for PasswordAlgorithms
impl Send for PasswordAlgorithms
impl Sync for PasswordAlgorithms
impl Unpin for PasswordAlgorithms
impl UnwindSafe for PasswordAlgorithms
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more