Struct chbs::word::WordSampler
source · [−]pub struct WordSampler { /* private fields */ }
Expand description
An iterator uniformly sampling words.
This sampler uses a given wordlist of wich random words are picked for use in passphrases. The randomization is concidered cryptographically secure.
The iterator is infinite, as much words as needed may be pulled from this iterator.
To construct an instance based on a WordList
, use the
sampler
method.
Implementations
sourceimpl WordSampler
impl WordSampler
sourcepub fn new(words: Vec<String>) -> WordSampler
pub fn new(words: Vec<String>) -> WordSampler
Build a new word sampler which samples the given word list.
Trait Implementations
sourceimpl Clone for WordSampler
impl Clone for WordSampler
sourcefn clone(&self) -> WordSampler
fn clone(&self) -> WordSampler
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WordSampler
impl Debug for WordSampler
sourceimpl HasEntropy for WordSampler
impl HasEntropy for WordSampler
sourceimpl IntoIterator for WordSampler
impl IntoIterator for WordSampler
sourceimpl WordProvider for WordSampler
impl WordProvider for WordSampler
Auto Trait Implementations
impl RefUnwindSafe for WordSampler
impl Send for WordSampler
impl Sync for WordSampler
impl Unpin for WordSampler
impl UnwindSafe for WordSampler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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