pub trait WithPhrase {
    type E: Error;

    fn generate_with_phrase(
        word_count: usize,
        password: Option<&str>
    ) -> Result<(Self, String), Self::E>
    where
        Self: Sized
; fn from_phrase<'a, S: Into<Cow<'a, str>>>(
        s: S,
        password: Option<&str>
    ) -> Result<Self, Self::E>
    where
        Self: Sized
; fn generate_in_with<R>(
        rng: &mut R,
        word_count: usize,
        password: Option<&str>
    ) -> Result<(Self, String), Self::E>
    where
        Self: Sized,
        R: RngCore + CryptoRng
; }
Expand description

Generate and construct a value with mnemonic phrase and optional password.

Required Associated Types§

Required Methods§

Generate a new value of word_count words and optional password.

Returns tuple of generated value and a phrase or error.

Construct a value from mnemonic phrase and optional password.

Generate a new value of word_count words and optional password witn rng PRF.

Returns tuple of generated value and a phrase or error.

Implementors§