1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Component kind traits
//!
//! The function of this trait is defined in the [`component`](super) module.
use Debug;
use crate*;
/// Something that provides random words.
///
/// A word provider is used to provide any number of words for passphrase generation.
/// Whether random words are genrated, or whether they are sampled from a known wordlist is
/// undefined and decided by the implementor. Providers must be infinite and should never deplete.
/// It is possible that the same word may be obtained more than once.
///
/// When generating a passphrase a set of words is obtained from a word provider by subsequent
/// calls to [`word`](WordProvider::word).
///
/// This trait is not used as component kind on [`Scheme`](::scheme::Scheme), it may however be
/// useful to implement on types that support this functionallity. In addition to that, the
/// [`WordSetProvider`](WordSetProvider) should be easy to implement on types that implement this
/// trait.
/// Something that provides sets of random words.
///
/// A component that provides functionallity to source a random set of passphrase words.
/// On sourcing, an ordered list of random passphrase words is returned that will be used in the
/// password.
///
/// This differs from [`WordProvider`](WordProvider) as this provides a set of words instead of a
/// single word. It should be fairly easy to implement this trait on types that have the
/// [`WordProvider`](WordProvider) implemented.
/// Something that provides logic to _style_ each passphrase word.
/// This could be used to build a styler for word capitalization.
/// Something that provides logic to combine a list of passphrase words into a passphrase.
/// Something that provides logic to _style_ a passphrase as a whole.