pub struct Mnemonic(/* private fields */);Expand description
A mnemonic seed phrase to recover a BIP-32 wallet.
Implementations§
Source§impl Mnemonic
impl Mnemonic
Sourcepub fn from_string(mnemonic: String) -> Result<Self, Bip39Error>
pub fn from_string(mnemonic: String) -> Result<Self, Bip39Error>
Parse a string as a mnemonic seed phrase.
Sourcepub fn from_entropy(entropy: Vec<u8>) -> Result<Self, Bip39Error>
pub fn from_entropy(entropy: Vec<u8>) -> Result<Self, Bip39Error>
Construct a mnemonic given an array of bytes. Note that using weak entropy will result in a loss of funds. To ensure the entropy is generated properly, read about your operating system specific ways to generate secure random numbers.
Trait Implementations§
Source§impl<UT> LowerError<UT> for Mnemonic
impl<UT> LowerError<UT> for Mnemonic
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for Mnemonic
impl<UT> LowerReturn<UT> for Mnemonic
Source§type ReturnType = <Arc<Mnemonic> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Mnemonic> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Auto Trait Implementations§
impl Freeze for Mnemonic
impl RefUnwindSafe for Mnemonic
impl Send for Mnemonic
impl Sync for Mnemonic
impl Unpin for Mnemonic
impl UnwindSafe for Mnemonic
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more