passwordmaker-rs 0.2.3

Rust reimplementation of the PasswordMaker Pro algorithm. This is partially a port, partially written from scratch. Compatibility is a goal, but not guaranteed.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use unicode_segmentation::UnicodeSegmentation;
#[derive(Clone)]
pub(super) struct Grapheme<'a>(&'a str);

impl<'a> Grapheme<'a> {
    pub(super) fn iter_from_str(string : &'a str) -> impl Iterator<Item=Grapheme<'a>> {
        string.graphemes(true).map(Self::extract_grapheme_unchecked)
    }
    pub(super) fn get<'b>(&'b self) -> &'a str { self.0 }
    fn extract_grapheme_unchecked(s : &str) -> Grapheme { Grapheme(s) }
}