Trait Reset

Source
pub trait Reset: WalletTest + Sized {
    type Handle;

    // Required method
    fn reset<C>(st: &mut TestState<C, Self, LocalNetwork>) -> Self::Handle;
}
Available on crate feature test-dependencies only.
Expand description

Trait method exposing the ability to reset the wallet within a test.

Required Associated Types§

Source

type Handle

A handle that confers ownership of a specific wallet instance.

Required Methods§

Source

fn reset<C>(st: &mut TestState<C, Self, LocalNetwork>) -> Self::Handle

Replaces the wallet in st (via TestState::wallet_mut) with a new wallet database.

This does not recreate accounts. The resulting wallet in st has no test account.

Returns the old wallet.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§