[][src]Struct libra_wallet::Mnemonic

pub struct Mnemonic(_);

Mnemonic seed for deterministic key derivation based on BIP39. The mnemonic must encode entropy in a multiple of 32 bits. With more entropy, security is improved but the number of words increases.

The allowed sizes of entropy are 128, 160, 192, 224 and 256 bits as shown in the following table.

+---------+-------+ | ENTROPY | WORDS | +---------+-------+ | 128 | 12 | | 160 | 15 | | 192 | 18 | | 224 | 21 | | 256 | 24 | +---------+-------+

Implementations

impl Mnemonic[src]

pub fn from(s: &str) -> Result<Mnemonic>[src]

Generate mnemonic from string.

pub fn mnemonic(entropy: &[u8]) -> Result<Mnemonic>[src]

Generate mnemonic from entropy byte-array.

pub fn write(&self, output_file_path: &Path) -> Result<()>[src]

Write mnemonic to output_file_path.

pub fn read(input_file_path: &Path) -> Result<Self>[src]

Read mnemonic from input_file_path.

Trait Implementations

impl ToString for Mnemonic[src]

Auto Trait Implementations

impl RefUnwindSafe for Mnemonic

impl Send for Mnemonic

impl Sync for Mnemonic

impl Unpin for Mnemonic

impl UnwindSafe for Mnemonic

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,