Skip to main content

Wallet

Struct Wallet 

Source
pub struct Wallet {
    pub name: String,
    pub path: String,
    pub hotkey: String,
    /* private fields */
}

Fields§

§name: String§path: String§hotkey: String

Implementations§

Source§

impl Wallet

Source

pub fn new( name: Option<String>, hotkey: Option<String>, path: Option<String>, config: Option<Config>, ) -> Self

Initialize the bittensor wallet object containing a hot and coldkey.

Arguments:
    name (Optional[str]): The name of the wallet. Defaults to "default".
    hotkey (Optional[str]): The name of hotkey. Defaults to "default".
    path (Optional[str]): The path to wallets. Defaults to "~/.bittensor/wallets/".
    config (Optional[Config]): Optional configuration.

Returns:
    `Wallet` - A new Wallet instance.
Source

pub fn config() -> Config

Get default config

Source

pub fn help() -> Config

Print help information

Source

pub fn add_args(parser: Command, _prefix: Option<&str>) -> Command

Source

pub fn create_if_non_existent( &mut self, coldkey_use_password: bool, hotkey_use_password: bool, save_coldkey_to_env: bool, save_hotkey_to_env: bool, coldkey_password: Option<String>, hotkey_password: Option<String>, overwrite: bool, suppress: bool, ) -> Result<Self, WalletError>

Checks for existing coldkeypub, hotkeypub, hotkeys, and creates them if non-existent.

Arguments:
    coldkey_use_password (bool): Whether to use a password for coldkey. Defaults to ``True``.
    hotkey_use_password (bool): Whether to use a password for hotkey. Defaults to ``False``.
    save_coldkey_to_env (bool): Whether to save a coldkey password to local env. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save a hotkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``. If `coldkey_password` is passed, then `coldkey_use_password` is automatically ``True``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``. If `hotkey_password` is passed, then `hotkey_use_password` is automatically ``True``.
    overwrite (bool): Whether to overwrite an existing keys. Defaults to ``False``.
    suppress (bool): If ``True``, suppresses the display of the keys mnemonic message. Defaults to ``False``.

Returns:
    `Wallet` - The wallet instance with created keys.
Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn create( &mut self, coldkey_use_password: bool, hotkey_use_password: bool, save_coldkey_to_env: bool, save_hotkey_to_env: bool, coldkey_password: Option<String>, hotkey_password: Option<String>, overwrite: bool, suppress: bool, ) -> Result<Self, WalletError>

Checks for existing coldkeypub and hotkeys, and creates them if non-existent.

Arguments:
    coldkey_use_password (bool): Whether to use a password for coldkey. Defaults to ``True``.
    hotkey_use_password (bool): Whether to use a password for hotkey. Defaults to ``False``.
    save_coldkey_to_env (bool): Whether to save a coldkey password to local env. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save a hotkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``. If `coldkey_password` is passed, then `coldkey_use_password` is automatically ``True``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``. If `hotkey_password` is passed, then `hotkey_use_password` is automatically ``True``.
    overwrite (bool): Whether to overwrite an existing keys. Defaults to ``False``.
    suppress (bool): If ``True``, suppresses the display of the keys mnemonic message. Defaults to ``False``.

Returns:
    Wallet instance with created keys.

Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn recreate( &mut self, coldkey_use_password: bool, hotkey_use_password: bool, save_coldkey_to_env: bool, save_hotkey_to_env: bool, coldkey_password: Option<String>, hotkey_password: Option<String>, overwrite: bool, suppress: bool, ) -> Result<Self, WalletError>

Checks for existing coldkeypub and hotkeys, and recreates them if non-existent.

Arguments:
    coldkey_use_password (bool): Whether to use a password for coldkey. Defaults to ``True``.
    hotkey_use_password (bool): Whether to use a password for hotkey. Defaults to ``False``.
    save_coldkey_to_env (bool): Whether to save a coldkey password to local env. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save a hotkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``. If `coldkey_password` is passed, then `coldkey_use_password` is automatically ``True``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``. If `hotkey_password` is passed, then `hotkey_use_password` is automatically ``True``.
    overwrite (bool): Whether to overwrite an existing keys. Defaults to ``False``.
    suppress (bool): If ``True``, suppresses the display of the keys mnemonic message. Defaults to ``False``.

Returns:
    Wallet instance with created keys.

Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn hotkey_file(&self) -> Result<Keyfile, KeyFileError>

Returns the hotkey file.

Source

pub fn create_hotkey_file( &self, save_hotkey_to_env: bool, ) -> Result<Keyfile, KeyFileError>

Creates a new hotkey file for the keypair.

Arguments:
    save_hotkey_to_env (bool): Whether to save hotkey password to local env. Defaults to ``False``.

Returns:
    `Keyfile` - The created hotkey file.
Raises:
    KeyFileError: If file creation fails.
Source

pub fn coldkey_file(&self) -> Result<Keyfile, KeyFileError>

Returns the coldkey file.

Source

pub fn create_coldkey_file( &self, save_coldkey_to_env: bool, ) -> Result<Keyfile, KeyFileError>

Creates a new coldkey file for the keypair.

Arguments:
    save_coldkey_to_env (bool): Whether to save coldkey password to local env. Defaults to ``False``.

Returns:
    `Keyfile` - The created coldkey file.
Raises:
    KeyFileError: If file creation fails.
Source

pub fn hotkeypub_file(&self) -> Result<Keyfile, KeyFileError>

Returns the hotkeypub file.

Source

pub fn coldkeypub_file(&self) -> Result<Keyfile, KeyFileError>

Returns the coldkeypub file.

Source

pub fn coldkey_property(&self) -> Result<Keypair, KeyFileError>

Returns the coldkey from wallet.path/wallet.name/coldkey or raises an error.

Source

pub fn coldkeypub_property(&self) -> Result<Keypair, KeyFileError>

Returns the coldkeypub from wallet.path/wallet.name/coldkeypub.txt or raises an error.

Source

pub fn hotkey_property(&self) -> Result<Keypair, KeyFileError>

Returns the hotkey from wallet.path/wallet.name/hotkeys/wallet.hotkey or raises an error.

Source

pub fn hotkeypub_property(&self) -> Result<Keypair, KeyFileError>

Returns the hotkeypub from wallet.path/wallet.name/hotkeypub.txt or raises an error.

Source

pub fn get_name(&self) -> String

Returns the name of the wallet

Source

pub fn get_path(&self) -> String

Returns the path of the wallet

Source

pub fn get_hotkey_str(&self) -> String

Returns the hotkey name

Source

pub fn set_coldkey( &mut self, keypair: Keypair, encrypt: bool, overwrite: bool, save_coldkey_to_env: bool, coldkey_password: Option<String>, ) -> Result<(), KeyFileError>

Sets the coldkey for the wallet.

Arguments:
    keypair (Keypair): The keypair to set as coldkey.
    encrypt (bool): Whether to encrypt the key. Defaults to ``True``.
    overwrite (bool): Whether to overwrite if key exists. Defaults to ``False``.
    save_coldkey_to_env (bool): Whether to save coldkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``.

Raises:
    KeyFileError: If file operations fail.
Source

pub fn set_coldkeypub( &mut self, keypair: Keypair, encrypt: bool, overwrite: bool, ) -> Result<(), KeyFileError>

Sets the coldkeypub for the wallet.

Arguments:
    keypair (Keypair): The keypair to set as coldkeypub.
    encrypt (bool): Whether to encrypt the key. Defaults to ``False``.
    overwrite (bool): Whether to overwrite if key exists. Defaults to ``False``.

Raises:
    KeyFileError: If file operations fail.
Source

pub fn set_hotkey( &mut self, keypair: Keypair, encrypt: bool, overwrite: bool, save_hotkey_to_env: bool, hotkey_password: Option<String>, ) -> Result<(), KeyFileError>

Sets the hotkey for the wallet.

Arguments:
    keypair (Keypair): The keypair to set as hotkey.
    encrypt (bool): Whether to encrypt the key. Defaults to ``False``.
    overwrite (bool): Whether to overwrite if key exists. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save hotkey password to local env. Defaults to ``False``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``.

Raises:
    KeyFileError: If file operations fail.
Source

pub fn set_hotkeypub( &mut self, keypair: Keypair, encrypt: bool, overwrite: bool, ) -> Result<(), KeyFileError>

Sets the hotkeypub for the wallet.

Arguments:
    keypair (Keypair): The keypair to set as hotkeypub.
    encrypt (bool): Whether to encrypt the key. Defaults to ``False``.
    overwrite (bool): Whether to overwrite if key exists. Defaults to ``False``.

Raises:
    KeyFileError: If file operations fail.
Source

pub fn get_coldkey( &self, password: Option<String>, ) -> Result<Keypair, KeyFileError>

Gets the coldkey from the wallet.

Arguments:
    password (Optional[str]): Password for decryption. Defaults to ``None``. If not provided, asks for user input.

Returns:
    `Keypair` - The coldkey keypair.
Raises:
    KeyFileError: If the coldkey file doesn't exist or decryption fails.
Source

pub fn get_coldkeypub( &self, password: Option<String>, ) -> Result<Keypair, KeyFileError>

Gets the coldkeypub from the wallet.

Arguments:
    password (Optional[str]): Password for decryption. Defaults to ``None``. If not provided, asks for user input.

Returns:
    `Keypair` - The coldkeypub keypair.
Raises:
    KeyFileError: If the coldkeypub file doesn't exist or decryption fails.
Source

pub fn get_hotkey( &self, password: Option<String>, ) -> Result<Keypair, KeyFileError>

Gets the hotkey from the wallet.

Arguments:
    password (Optional[str]): Password for decryption. Defaults to ``None``. If not provided, asks for user input.

Returns:
    `Keypair` - The hotkey keypair.
Raises:
    KeyFileError: If the hotkey file doesn't exist or decryption fails.
Source

pub fn get_hotkeypub( &self, password: Option<String>, ) -> Result<Keypair, KeyFileError>

Gets the hotkeypub from the wallet.

Arguments:
    password (Optional[str]): Password for decryption. Defaults to ``None``. If not provided, asks for user input.

Returns:
    `Keypair` - The hotkeypub keypair.
Raises:
    KeyFileError: If the hotkeypub file doesn't exist or decryption fails.
Source

pub fn create_coldkey_from_uri( &mut self, uri: String, use_password: bool, overwrite: bool, suppress: bool, save_coldkey_to_env: bool, coldkey_password: Option<String>, ) -> Result<Wallet, KeyFileError>

Creates coldkey from uri string, optionally encrypts it with the user-provided password.

Arguments:
    uri (str): The URI string to create the coldkey from.
    use_password (bool): Whether to use a password for coldkey. Defaults to ``False``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``True``.
    save_coldkey_to_env (bool): Whether to save coldkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``.

Returns:
    `Wallet` - The wallet instance with created coldkey.
Raises:
    KeyFileError: If key creation or file operations fail.
Source

pub fn create_hotkey_from_uri( &mut self, uri: String, use_password: bool, overwrite: bool, suppress: bool, save_hotkey_to_env: bool, hotkey_password: Option<String>, ) -> Result<Wallet, KeyFileError>

Creates hotkey from uri string, optionally encrypts it with the user-provided password.

Arguments:
    uri (str): The URI string to create the hotkey from.
    use_password (bool): Whether to use a password for hotkey. Defaults to ``False``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``True``.
    save_hotkey_to_env (bool): Whether to save hotkey password to local env. Defaults to ``False``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``.

Returns:
    `Wallet` - The wallet instance with created hotkey.
Raises:
    KeyFileError: If key creation or file operations fail.
Source

pub fn unlock_coldkey(&mut self) -> Result<Keypair, KeyFileError>

Unlocks the coldkey.

Source

pub fn unlock_coldkeypub(&mut self) -> Result<Keypair, KeyFileError>

Unlocks the coldkeypub.

Source

pub fn unlock_hotkey(&mut self) -> Result<Keypair, KeyFileError>

Unlocks the hotkey.

Source

pub fn unlock_hotkeypub(&mut self) -> Result<Keypair, KeyFileError>

Unlocks the hotkeypub.

Source

pub fn new_coldkey( &mut self, n_words: usize, use_password: bool, overwrite: bool, suppress: bool, save_coldkey_to_env: bool, coldkey_password: Option<String>, ) -> Result<Wallet, WalletError>

Creates a new coldkey, optionally encrypts it with the user-provided password and saves to disk.

Arguments:
    n_words (int): The number of words in the mnemonic. Defaults to 12.
    use_password (bool): Whether to use a password for coldkey. Defaults to ``True``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``False``.
    save_coldkey_to_env (bool): Whether to save coldkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``. If `coldkey_password` is passed, then `use_password` is automatically ``True``.

Returns:
    `Wallet` - The wallet instance with created coldkey.
Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn new_hotkey( &mut self, n_words: usize, use_password: bool, overwrite: bool, suppress: bool, save_hotkey_to_env: bool, hotkey_password: Option<String>, ) -> Result<Self, WalletError>

Creates a new hotkey, optionally encrypts it with the user-provided password and saves to disk.

Arguments:
    n_words (int): The number of words in the mnemonic. Defaults to 12.
    use_password (bool): Whether to use a password for hotkey. Defaults to ``True``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save hotkey password to local env. Defaults to ``False``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``. If `hotkey_password` is passed, then `use_password` is automatically ``True``.

Returns:
    `Wallet` - The wallet instance with created hotkey.
Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn create_new_hotkey( &mut self, n_words: usize, use_password: bool, overwrite: bool, suppress: bool, save_hotkey_to_env: bool, hotkey_password: Option<String>, ) -> Result<Wallet, WalletError>

Creates a new hotkey, optionally encrypts it with the user-provided password and saves to disk.

Arguments:
    n_words (int): The number of words in the mnemonic. Defaults to 12.
    use_password (bool): Whether to use a password for hotkey. Defaults to ``False``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save hotkey password to local env. Defaults to ``False``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``. If `hotkey_password` is passed, then `use_password` is automatically ``True``.

Returns:
    `Wallet` - The wallet instance with created hotkey.
Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn regenerate_coldkey( &mut self, mnemonic: Option<String>, seed: Option<String>, json: Option<(String, String)>, use_password: bool, overwrite: bool, suppress: bool, save_coldkey_to_env: bool, coldkey_password: Option<String>, ) -> Result<Self, WalletError>

Regenerates the coldkey from the passed mnemonic or seed, or JSON encrypts it with the user’s password and saves the file.

Arguments:
    mnemonic (Optional[str]): Mnemonic phrase to regenerate the coldkey from. Defaults to ``None``.
    seed (Optional[str]): Seed hex to regenerate the coldkey from. Defaults to ``None``.
    json (Optional[tuple]): Tuple of (JSON data, passphrase) to regenerate the coldkey from. Defaults to ``None``.
    use_password (bool): Whether to use a password for coldkey. Defaults to ``True``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``False``.
    save_coldkey_to_env (bool): Whether to save coldkey password to local env. Defaults to ``False``.
    coldkey_password (Optional[str]): Coldkey password for encryption. Defaults to ``None``.

Returns:
    `Wallet` - The wallet instance with regenerated coldkey.
Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn regenerate_coldkeypub( &mut self, ss58_address: Option<String>, public_key: Option<String>, overwrite: bool, ) -> Result<Self, WalletError>

Regenerates the coldkeypub from the passed ss58_address or public_key and saves the file. Requires either ss58_address or public_key to be passed.

Arguments:
    ss58_address (Optional[str]): SS58 address to regenerate the coldkeypub from. Defaults to ``None``.
    public_key (Optional[str]): Public key hex to regenerate the coldkeypub from. Defaults to ``None``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.

Returns:
    `Wallet` - The wallet instance with regenerated coldkeypub.
Raises:
    WalletError: If key generation or file operations fail.
Source

pub fn regenerate_hotkey( &mut self, mnemonic: Option<String>, seed: Option<String>, json: Option<(String, String)>, use_password: bool, overwrite: bool, suppress: bool, save_hotkey_to_env: bool, hotkey_password: Option<String>, ) -> Result<Self, KeyFileError>

Regenerates the hotkey from passed mnemonic or seed, encrypts it with the user’s password and saves the file.

Arguments:
    mnemonic (Optional[str]): Mnemonic phrase to regenerate the hotkey from. Defaults to ``None``.
    seed (Optional[str]): Seed hex to regenerate the hotkey from. Defaults to ``None``.
    json (Optional[tuple]): Tuple of (JSON data, passphrase) to regenerate the hotkey from. Defaults to ``None``.
    use_password (bool): Whether to use a password for hotkey. Defaults to ``False``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.
    suppress (bool): Whether to suppress mnemonic display. Defaults to ``False``.
    save_hotkey_to_env (bool): Whether to save hotkey password to local env. Defaults to ``False``.
    hotkey_password (Optional[str]): Hotkey password for encryption. Defaults to ``None``.

Returns:
    `Wallet` - The wallet instance with regenerated hotkey.
Raises:
    KeyFileError: If key generation or file operations fail.
Source

pub fn regenerate_hotkeypub( &mut self, ss58_address: Option<String>, public_key: Option<String>, overwrite: bool, ) -> Result<Self, WalletError>

Regenerates the hotkeypub from the passed ss58_address or public_key and saves the file. Requires either ss58_address or public_key to be passed.

Arguments:
    ss58_address (Optional[str]): SS58 address to regenerate the hotkeypub from. Defaults to ``None``.
    public_key (Optional[str]): Public key hex to regenerate the hotkeypub from. Defaults to ``None``.
    overwrite (bool): Whether to overwrite existing keys. Defaults to ``False``.

Returns:
    `Wallet` - The wallet instance with regenerated hotkeypub.
Raises:
    WalletError: If key generation or file operations fail.

Trait Implementations§

Source§

impl Clone for Wallet

Source§

fn clone(&self) -> Wallet

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Wallet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Wallet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

Source§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

Source§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

Source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> MaybeDebug for T
where T: Debug,

Source§

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,