Add Mnemonic::language getter
This commit is contained in:
parent
63d3eab009
commit
3994ee95b0
|
@ -294,6 +294,11 @@ impl Mnemonic {
|
|||
Mnemonic::generate_in(Language::English, word_count)
|
||||
}
|
||||
|
||||
/// Get the language of the [Mnemonic].
|
||||
pub fn language(&self) -> Language {
|
||||
self.lang
|
||||
}
|
||||
|
||||
/// Get an iterator over the words.
|
||||
pub fn word_iter(&self) -> impl Iterator<Item = &'static str> + Clone + '_ {
|
||||
let list = self.lang.word_list();
|
||||
|
|
Loading…
Reference in New Issue