Struct walletd_bitcoin::Bip39Mnemonic
source · pub struct Bip39Mnemonic { /* private fields */ }
Expand description
Represents a mnemonic which follows the BIP39 standard
(https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).
Trait Implementations§
source§impl Clone for Bip39Mnemonic
impl Clone for Bip39Mnemonic
source§fn clone(&self) -> Bip39Mnemonic
fn clone(&self) -> Bip39Mnemonic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Bip39Mnemonic
impl Debug for Bip39Mnemonic
source§impl Mnemonic for Bip39Mnemonic
impl Mnemonic for Bip39Mnemonic
source§fn new(
language: Bip39Language,
mnemonic_type: Bip39MnemonicType,
passphrase: Option<&str>
) -> Bip39Mnemonic
fn new( language: Bip39Language, mnemonic_type: Bip39MnemonicType, passphrase: Option<&str> ) -> Bip39Mnemonic
Generates a new mnemonic given the language of the mnemonic phrase, mnemonic type related to number of words in the mnemonic phrase, and an optional passphrase.
source§fn from_phrase(
language: Bip39Language,
phrase: &str,
specified_passphrase: Option<&str>
) -> Result<Bip39Mnemonic, Error>
fn from_phrase( language: Bip39Language, phrase: &str, specified_passphrase: Option<&str> ) -> Result<Bip39Mnemonic, Error>
Restores a mnemonic from a mnemonic phrase and optional passphrase, requires specifying the language.
source§fn detect_language(
phrase: &str,
specified_passphrase: Option<&str>
) -> Result<<Bip39Mnemonic as Mnemonic>::Mnemonic, <Bip39Mnemonic as Mnemonic>::ErrorType>
fn detect_language( phrase: &str, specified_passphrase: Option<&str> ) -> Result<<Bip39Mnemonic as Mnemonic>::Mnemonic, <Bip39Mnemonic as Mnemonic>::ErrorType>
Restores a mnemonic from a mnemonic phrase and optional passphrase, automatically detects the language of the mnemonic phrase. Returns an error if the language of the mnemonic phrase cannot be detected or if the mnemonic phrase provided was not valid.
source§fn mnemonic_type(&self) -> Bip39MnemonicType
fn mnemonic_type(&self) -> Bip39MnemonicType
Returns the mnemonic type (an indicator of the number of words in the mnemonic phrase).
type ErrorType = Error
§type Language = Bip39Language
type Language = Bip39Language
The associated Language struct
type Mnemonic = Bip39Mnemonic
§type MnemonicBuilder = Bip39MnemonicBuilder
type MnemonicBuilder = Bip39MnemonicBuilder
The associated Builder struct for the Mnemonic
§type MnemonicType = Bip39MnemonicType
type MnemonicType = Bip39MnemonicType
The associated MnemonicType struct
source§fn builder() -> <Bip39Mnemonic as Mnemonic>::MnemonicBuilder
fn builder() -> <Bip39Mnemonic as Mnemonic>::MnemonicBuilder
Auto Trait Implementations§
impl RefUnwindSafe for Bip39Mnemonic
impl Send for Bip39Mnemonic
impl Sync for Bip39Mnemonic
impl Unpin for Bip39Mnemonic
impl UnwindSafe for Bip39Mnemonic
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