pub struct WordDictionary { /* private fields */ }
Expand description
Word dictionary for three-word address encoding
Implementations§
Source§impl WordDictionary
impl WordDictionary
Sourcepub fn get_word(&self, position: usize, index: usize) -> Option<&String>
pub fn get_word(&self, position: usize, index: usize) -> Option<&String>
Get word by position and index
Sourcepub fn get_index(&self, position: usize, word: &str) -> Option<usize>
pub fn get_index(&self, position: usize, word: &str) -> Option<usize>
Get index by position and word
Sourcepub fn validate_word(&self, position: usize, word: &str) -> bool
pub fn validate_word(&self, position: usize, word: &str) -> bool
Validate that a word exists in the specified position
Trait Implementations§
Source§impl Clone for WordDictionary
impl Clone for WordDictionary
Source§fn clone(&self) -> WordDictionary
fn clone(&self) -> WordDictionary
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WordDictionary
impl Debug for WordDictionary
Auto Trait Implementations§
impl Freeze for WordDictionary
impl RefUnwindSafe for WordDictionary
impl Send for WordDictionary
impl Sync for WordDictionary
impl Unpin for WordDictionary
impl UnwindSafe for WordDictionary
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