pub struct MockWalletDb {
pub network: Network,
pub sapling_tree: ShardTree<MemoryShardStore<Node, BlockHeight>, { _ }, SAPLING_SHARD_HEIGHT>,
pub orchard_tree: ShardTree<MemoryShardStore<MerkleHashOrchard, BlockHeight>, { _ }, ORCHARD_SHARD_HEIGHT>,
/* private fields */
}Available on crate features
test-dependencies only.Expand description
A mock wallet data source that implements the bare minimum necessary to function.
Fields§
§network: Network§sapling_tree: ShardTree<MemoryShardStore<Node, BlockHeight>, { _ }, SAPLING_SHARD_HEIGHT>§orchard_tree: ShardTree<MemoryShardStore<MerkleHashOrchard, BlockHeight>, { _ }, ORCHARD_SHARD_HEIGHT>Available on crate feature
orchard only.Implementations§
Source§impl MockWalletDb
impl MockWalletDb
Trait Implementations§
Source§impl InputSource for MockWalletDb
impl InputSource for MockWalletDb
Source§fn anchor_computable(
&self,
protocol: ShieldedPool,
height: BlockHeight,
) -> Result<bool, Self::Error>
fn anchor_computable( &self, protocol: ShieldedPool, height: BlockHeight, ) -> Result<bool, Self::Error>
Returns whether an anchor is COMPUTABLE at
height for spends from the given pool: whether
this data source can produce the note commitment tree root, and witnesses to it, as of the
end of that block. Read moreSource§fn get_spendable_note(
&self,
_txid: &TxId,
_protocol: ShieldedPool,
_index: u32,
_target_height: TargetHeight,
_lock_filter: LockFilter<'_>,
) -> Result<Option<ReceivedNote<Self::NoteRef, Note>>, Self::Error>
fn get_spendable_note( &self, _txid: &TxId, _protocol: ShieldedPool, _index: u32, _target_height: TargetHeight, _lock_filter: LockFilter<'_>, ) -> Result<Option<ReceivedNote<Self::NoteRef, Note>>, Self::Error>
Fetches a spendable note by indexing into a transaction’s shielded outputs for the
specified shielded protocol. Read more
Source§fn select_spendable_notes(
&self,
_account: Self::AccountId,
_target_value: TargetValue,
_sources: &[ShieldedPool],
_target_height: TargetHeight,
_confirmations_policy: ConfirmationsPolicy,
_exclude: &[Self::NoteRef],
_lock_filter: LockFilter<'_>,
) -> Result<ReceivedNotes<Self::NoteRef>, Self::Error>
fn select_spendable_notes( &self, _account: Self::AccountId, _target_value: TargetValue, _sources: &[ShieldedPool], _target_height: TargetHeight, _confirmations_policy: ConfirmationsPolicy, _exclude: &[Self::NoteRef], _lock_filter: LockFilter<'_>, ) -> Result<ReceivedNotes<Self::NoteRef>, Self::Error>
Returns a list of spendable notes sufficient to cover the specified target value, if
possible. Only spendable notes from the pools in
sources will be included, and a
note in exclude is never returned. Locked outputs are selected according to
lock_filter (see LockFilter; a LockFilter::Policy carrying the default
Exclude selects none).Source§fn select_unspent_notes(
&self,
_account: Self::AccountId,
_sources: &[ShieldedPool],
_target_height: TargetHeight,
_exclude: &[Self::NoteRef],
_lock_filter: LockFilter<'_>,
) -> Result<ReceivedNotes<Self::NoteRef>, Self::Error>
fn select_unspent_notes( &self, _account: Self::AccountId, _sources: &[ShieldedPool], _target_height: TargetHeight, _exclude: &[Self::NoteRef], _lock_filter: LockFilter<'_>, ) -> Result<ReceivedNotes<Self::NoteRef>, Self::Error>
Returns the list of notes belonging to the wallet that are unspent as of the specified
target height. Locked outputs are selected according to
lock_filter (see LockFilter;
a LockFilter::Policy carrying the default Exclude selects none).Source§fn get_change_receivers(
&self,
account: Self::AccountId,
) -> Result<ChangeReceivers, ()>
fn get_change_receivers( &self, account: Self::AccountId, ) -> Result<ChangeReceivers, ()>
Returns the outputs in which the specified account can receive change. Read more
Source§fn get_account_metadata(
&self,
_account: Self::AccountId,
_selector: &NoteFilter,
_target_height: TargetHeight,
_exclude: &[Self::NoteRef],
_lock_filter: LockFilter<'_>,
) -> Result<AccountMeta, Self::Error>
fn get_account_metadata( &self, _account: Self::AccountId, _selector: &NoteFilter, _target_height: TargetHeight, _exclude: &[Self::NoteRef], _lock_filter: LockFilter<'_>, ) -> Result<AccountMeta, Self::Error>
Returns metadata describing the structure of the wallet for the specified account. Read more
Source§fn select_single_spendable_note(
&self,
account: Self::AccountId,
value: Zatoshis,
sources: &[ShieldedPool],
target_height: TargetHeight,
confirmations_policy: ConfirmationsPolicy,
exclude: &[Self::NoteRef],
lock_filter: LockFilter<'_>,
) -> Result<ReceivedNotes<Self::NoteRef>, Self::Error>
fn select_single_spendable_note( &self, account: Self::AccountId, value: Zatoshis, sources: &[ShieldedPool], target_height: TargetHeight, confirmations_policy: ConfirmationsPolicy, exclude: &[Self::NoteRef], lock_filter: LockFilter<'_>, ) -> Result<ReceivedNotes<Self::NoteRef>, Self::Error>
Returns the OLDEST single spendable note whose value alone is at least
value, drawn
from the first pool in sources (in the given preference order) that holds one. A note
in exclude is never returned. The returned collection contains at most one note; it is
empty when no single eligible note covers the value. Read moreSource§fn get_unspent_transparent_output(
&self,
_outpoint: &OutPoint,
_target_height: TargetHeight,
) -> Result<Option<WalletTransparentOutput<Self::AccountId>>, Self::Error>
fn get_unspent_transparent_output( &self, _outpoint: &OutPoint, _target_height: TargetHeight, ) -> Result<Option<WalletTransparentOutput<Self::AccountId>>, Self::Error>
Available on crate feature
transparent-inputs only.Fetches the transparent output corresponding to the provided
outpoint if it is considered
spendable as of the provided target_height. Read moreSource§fn get_spendable_transparent_outputs(
&self,
_address: &TransparentAddress,
_target_height: TargetHeight,
_confirmations_policy: ConfirmationsPolicy,
_output_filter: CoinbaseFilter,
_lock_filter: LockFilter<'_>,
) -> Result<Vec<WalletTransparentOutput<Self::AccountId>>, Self::Error>
fn get_spendable_transparent_outputs( &self, _address: &TransparentAddress, _target_height: TargetHeight, _confirmations_policy: ConfirmationsPolicy, _output_filter: CoinbaseFilter, _lock_filter: LockFilter<'_>, ) -> Result<Vec<WalletTransparentOutput<Self::AccountId>>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the list of unspent transparent outputs received by this wallet at
address
such that, at height target_height: Read moreSource§fn get_spendable_transparent_outputs_for_addresses(
&self,
addresses: &[TransparentAddress],
target_height: TargetHeight,
confirmations_policy: ConfirmationsPolicy,
output_filter: CoinbaseFilter,
lock_filter: LockFilter<'_>,
) -> Result<Vec<WalletTransparentOutput<Self::AccountId>>, Self::Error>
fn get_spendable_transparent_outputs_for_addresses( &self, addresses: &[TransparentAddress], target_height: TargetHeight, confirmations_policy: ConfirmationsPolicy, output_filter: CoinbaseFilter, lock_filter: LockFilter<'_>, ) -> Result<Vec<WalletTransparentOutput<Self::AccountId>>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the list of spendable transparent outputs received by this wallet at any of the
given
addresses, subject to the same spendability conditions as
InputSource::get_spendable_transparent_outputs. Read moreSource§fn select_spendable_transparent_outputs(
&self,
account: Self::AccountId,
target_height: TargetHeight,
confirmations_policy: ConfirmationsPolicy,
output_filter: CoinbaseFilter,
address_allow_list: Option<&[TransparentAddress]>,
target_value: TargetValue,
max_inputs: usize,
fee_rule: &StandardFeeRule,
lock_filter: LockFilter<'_>,
) -> Result<Vec<WalletTransparentOutput<Self::AccountId>>, Self::Error>
fn select_spendable_transparent_outputs( &self, account: Self::AccountId, target_height: TargetHeight, confirmations_policy: ConfirmationsPolicy, output_filter: CoinbaseFilter, address_allow_list: Option<&[TransparentAddress]>, target_value: TargetValue, max_inputs: usize, fee_rule: &StandardFeeRule, lock_filter: LockFilter<'_>, ) -> Result<Vec<WalletTransparentOutput<Self::AccountId>>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the spendable transparent outputs received by
account whose total post-fee
value (sum of values minus the cumulative marginal fee cost of the gathered inputs
themselves, per fee_rule) is at least target_value, or max_inputs outputs
(whichever is reached first). Read moreSource§impl OutputLockStore for MockWalletDb
impl OutputLockStore for MockWalletDb
Source§fn lock_outputs(
&mut self,
_outputs: &[OutputRef],
_owner: LockOwner,
_lock_expiry_height: BlockHeight,
) -> Result<usize, LockError<Self::Error>>
fn lock_outputs( &mut self, _outputs: &[OutputRef], _owner: LockOwner, _lock_expiry_height: BlockHeight, ) -> Result<usize, LockError<Self::Error>>
Locks the specified outputs on behalf of
owner so that, by default, they are not
selected for spending at any height less than or equal to the given height. Read moreSource§fn unlock_output(
&mut self,
_output: &OutputRef,
_owner: LockOwner,
) -> Result<bool, Self::Error>
fn unlock_output( &mut self, _output: &OutputRef, _owner: LockOwner, ) -> Result<bool, Self::Error>
Unlocks the specified output if it is locked by the given
owner, making it once again
available for spending and balance computations. Read moreSource§impl WalletCommitmentTrees for MockWalletDb
impl WalletCommitmentTrees for MockWalletDb
Source§fn put_orchard_subtree_roots(
&mut self,
start_index: u64,
roots: &[CommitmentTreeRoot<MerkleHashOrchard>],
) -> Result<(), ShardTreeError<Self::Error>>
Available on crate feature orchard only.
fn put_orchard_subtree_roots( &mut self, start_index: u64, roots: &[CommitmentTreeRoot<MerkleHashOrchard>], ) -> Result<(), ShardTreeError<Self::Error>>
orchard only.Adds a sequence of note commitment tree subtree roots to the data store.
type Error = !
Source§type SaplingShardStore<'a> = MemoryShardStore<Node, BlockHeight>
type SaplingShardStore<'a> = MemoryShardStore<Node, BlockHeight>
The type of the backing [
ShardStore] for the Sapling note commitment tree.Source§type OrchardShardStore<'a> = MemoryShardStore<MerkleHashOrchard, BlockHeight>
type OrchardShardStore<'a> = MemoryShardStore<MerkleHashOrchard, BlockHeight>
Available on crate feature
orchard only.The type of the backing [
ShardStore] for the Orchard note commitment tree.Source§fn with_sapling_tree_mut<F, A, E>(&mut self, callback: F) -> Result<A, E>where
for<'a> F: FnMut(&'a mut ShardTree<Self::SaplingShardStore<'a>, { ::sapling::NOTE_COMMITMENT_TREE_DEPTH }, SAPLING_SHARD_HEIGHT>) -> Result<A, E>,
E: From<ShardTreeError<Infallible>>,
fn with_sapling_tree_mut<F, A, E>(&mut self, callback: F) -> Result<A, E>where
for<'a> F: FnMut(&'a mut ShardTree<Self::SaplingShardStore<'a>, { ::sapling::NOTE_COMMITMENT_TREE_DEPTH }, SAPLING_SHARD_HEIGHT>) -> Result<A, E>,
E: From<ShardTreeError<Infallible>>,
Evaluates the given callback function with a reference to the Sapling
note commitment tree maintained by the wallet.
Source§fn put_sapling_subtree_roots(
&mut self,
start_index: u64,
roots: &[CommitmentTreeRoot<Node>],
) -> Result<(), ShardTreeError<Self::Error>>
fn put_sapling_subtree_roots( &mut self, start_index: u64, roots: &[CommitmentTreeRoot<Node>], ) -> Result<(), ShardTreeError<Self::Error>>
Adds a sequence of Sapling note commitment tree subtree roots to the data store. Read more
Source§fn get_sapling_subtree_root(
&mut self,
index: u64,
) -> Result<Option<Node>, ShardTreeError<Self::Error>>
fn get_sapling_subtree_root( &mut self, index: u64, ) -> Result<Option<Node>, ShardTreeError<Self::Error>>
Returns the stored root hash of the completed Sapling subtree with the given index,
or
Ok(None) if no root is recorded for that subtree. Read moreSource§fn with_orchard_tree_mut<F, A, E>(&mut self, callback: F) -> Result<A, E>where
for<'a> F: FnMut(&'a mut ShardTree<Self::OrchardShardStore<'a>, { _ }, ORCHARD_SHARD_HEIGHT>) -> Result<A, E>,
E: From<ShardTreeError<Self::Error>>,
fn with_orchard_tree_mut<F, A, E>(&mut self, callback: F) -> Result<A, E>where
for<'a> F: FnMut(&'a mut ShardTree<Self::OrchardShardStore<'a>, { _ }, ORCHARD_SHARD_HEIGHT>) -> Result<A, E>,
E: From<ShardTreeError<Self::Error>>,
Available on crate feature
orchard only.Evaluates the given callback function with a reference to the Orchard
note commitment tree maintained by the wallet.
Source§fn get_orchard_subtree_root(
&mut self,
index: u64,
) -> Result<Option<MerkleHashOrchard>, ShardTreeError<Self::Error>>
fn get_orchard_subtree_root( &mut self, index: u64, ) -> Result<Option<MerkleHashOrchard>, ShardTreeError<Self::Error>>
Available on crate feature
orchard only.Returns the stored root hash of the completed Orchard subtree with the given index,
or
Ok(None) if no root is recorded for that subtree. Read moreSource§fn with_ironwood_tree_mut<F, A, E>(
&mut self,
_callback: F,
) -> Result<Option<A>, E>where
for<'a> F: FnMut(&'a mut ShardTree<Self::OrchardShardStore<'a>, { _ }, ORCHARD_SHARD_HEIGHT>) -> Result<A, E>,
E: From<ShardTreeError<Self::Error>>,
fn with_ironwood_tree_mut<F, A, E>(
&mut self,
_callback: F,
) -> Result<Option<A>, E>where
for<'a> F: FnMut(&'a mut ShardTree<Self::OrchardShardStore<'a>, { _ }, ORCHARD_SHARD_HEIGHT>) -> Result<A, E>,
E: From<ShardTreeError<Self::Error>>,
Available on crate feature
orchard only.Evaluates the given callback with the Ironwood note commitment tree
maintained by the wallet, if this backend has one. Read more
Source§fn put_ironwood_subtree_roots(
&mut self,
_start_index: u64,
_roots: &[CommitmentTreeRoot<MerkleHashOrchard>],
) -> Result<(), ShardTreeError<Self::Error>>
fn put_ironwood_subtree_roots( &mut self, _start_index: u64, _roots: &[CommitmentTreeRoot<MerkleHashOrchard>], ) -> Result<(), ShardTreeError<Self::Error>>
Available on crate feature
orchard only.Adds a sequence of Ironwood note commitment tree subtree roots to the data store, if this
backend tracks an Ironwood tree. Read more
Source§fn get_ironwood_subtree_root(
&mut self,
_index: u64,
) -> Result<Option<MerkleHashOrchard>, ShardTreeError<Self::Error>>
fn get_ironwood_subtree_root( &mut self, _index: u64, ) -> Result<Option<MerkleHashOrchard>, ShardTreeError<Self::Error>>
Available on crate feature
orchard only.Returns the stored root hash of the completed Ironwood subtree with the given
index, or
Ok(None) if no root is recorded for that subtree (in particular, if
this backend does not track an Ironwood tree — the default implementation).Source§fn put_sapling_shards(
&mut self,
shards: &[LocatedPrunableTree<Node>],
cap: Option<&PrunableTree<Node>>,
checkpoints_remove: &[BlockHeight],
checkpoints_add: &[(BlockHeight, Checkpoint)],
) -> Result<(), ShardTreeError<Self::Error>>
fn put_sapling_shards( &mut self, shards: &[LocatedPrunableTree<Node>], cap: Option<&PrunableTree<Node>>, checkpoints_remove: &[BlockHeight], checkpoints_add: &[(BlockHeight, Checkpoint)], ) -> Result<(), ShardTreeError<Self::Error>>
Applies a batch of changes — shards, an optional replacement tree cap, and a
checkpoint delta — to the wallet’s Sapling note commitment tree. Read more
Source§fn put_orchard_shards(
&mut self,
shards: &[LocatedPrunableTree<MerkleHashOrchard>],
cap: Option<&PrunableTree<MerkleHashOrchard>>,
checkpoints_remove: &[BlockHeight],
checkpoints_add: &[(BlockHeight, Checkpoint)],
) -> Result<(), ShardTreeError<Self::Error>>
fn put_orchard_shards( &mut self, shards: &[LocatedPrunableTree<MerkleHashOrchard>], cap: Option<&PrunableTree<MerkleHashOrchard>>, checkpoints_remove: &[BlockHeight], checkpoints_add: &[(BlockHeight, Checkpoint)], ) -> Result<(), ShardTreeError<Self::Error>>
Available on crate feature
orchard only.Applies a batch of changes — shards, an optional replacement tree cap, and a
checkpoint delta — to the wallet’s Orchard note commitment tree. Read more
Source§fn put_ironwood_shards(
&mut self,
shards: &[LocatedPrunableTree<MerkleHashOrchard>],
cap: Option<&PrunableTree<MerkleHashOrchard>>,
checkpoints_remove: &[BlockHeight],
checkpoints_add: &[(BlockHeight, Checkpoint)],
) -> Result<(), ShardTreeError<Self::Error>>
fn put_ironwood_shards( &mut self, shards: &[LocatedPrunableTree<MerkleHashOrchard>], cap: Option<&PrunableTree<MerkleHashOrchard>>, checkpoints_remove: &[BlockHeight], checkpoints_add: &[(BlockHeight, Checkpoint)], ) -> Result<(), ShardTreeError<Self::Error>>
Available on crate feature
orchard only.Applies a batch of changes — shards, an optional replacement tree cap, and a
checkpoint delta — to the wallet’s Ironwood note commitment tree, if this backend
tracks one. Read more
Source§impl WalletRead for MockWalletDb
impl WalletRead for MockWalletDb
Source§type Account = (<MockWalletDb as WalletRead>::AccountId, UnifiedFullViewingKey, BlockHeight)
type Account = (<MockWalletDb as WalletRead>::AccountId, UnifiedFullViewingKey, BlockHeight)
The concrete account type used by this wallet backend.
Source§fn get_account_ids(&self) -> Result<Vec<Self::AccountId>, Self::Error>
fn get_account_ids(&self) -> Result<Vec<Self::AccountId>, Self::Error>
Returns a vector with the IDs of all accounts known to this wallet.
Source§fn get_account(
&self,
account_id: Self::AccountId,
) -> Result<Option<Self::Account>, Self::Error>
fn get_account( &self, account_id: Self::AccountId, ) -> Result<Option<Self::Account>, Self::Error>
Returns the account corresponding to the given ID, if any.
Source§fn get_derived_account(
&self,
_derivation: &Zip32Derivation,
) -> Result<Option<Self::Account>, Self::Error>
fn get_derived_account( &self, _derivation: &Zip32Derivation, ) -> Result<Option<Self::Account>, Self::Error>
Returns the account corresponding to a given [
SeedFingerprint] and
[zip32::AccountId], if any.Source§fn validate_seed(
&self,
_account_id: Self::AccountId,
_seed: &SecretVec<u8>,
) -> Result<bool, Self::Error>
fn validate_seed( &self, _account_id: Self::AccountId, _seed: &SecretVec<u8>, ) -> Result<bool, Self::Error>
Verifies that the given seed corresponds to the viewing key for the specified account. Read more
Source§fn seed_relevance_to_derived_accounts(
&self,
_seed: &SecretVec<u8>,
) -> Result<SeedRelevance<Self::AccountId>, Self::Error>
fn seed_relevance_to_derived_accounts( &self, _seed: &SecretVec<u8>, ) -> Result<SeedRelevance<Self::AccountId>, Self::Error>
Checks whether the given seed is relevant to any of the derived accounts (where
Account::source is AccountSource::Derived) in the wallet. Read moreSource§fn get_account_for_ufvk(
&self,
_ufvk: &UnifiedFullViewingKey,
) -> Result<Option<Self::Account>, Self::Error>
fn get_account_for_ufvk( &self, _ufvk: &UnifiedFullViewingKey, ) -> Result<Option<Self::Account>, Self::Error>
Returns the account corresponding to a given
UnifiedFullViewingKey, if any.Source§fn list_addresses(
&self,
account: Self::AccountId,
) -> Result<Vec<AddressInfo>, Self::Error>
fn list_addresses( &self, account: Self::AccountId, ) -> Result<Vec<AddressInfo>, Self::Error>
Returns information about every address tracked for this account. Read more
Source§fn find_account_for_address<P: Parameters>(
&self,
params: &P,
address: &Address,
) -> Result<Option<Self::AccountId>, FindAccountForAddressError<Self::Error>>
fn find_account_for_address<P: Parameters>( &self, params: &P, address: &Address, ) -> Result<Option<Self::AccountId>, FindAccountForAddressError<Self::Error>>
Returns the wallet account that controls the given address, if any. Read more
Source§fn get_last_generated_address_matching(
&self,
_account: Self::AccountId,
_request: UnifiedAddressRequest,
) -> Result<Option<UnifiedAddress>, Self::Error>
fn get_last_generated_address_matching( &self, _account: Self::AccountId, _request: UnifiedAddressRequest, ) -> Result<Option<UnifiedAddress>, Self::Error>
Returns the most recently generated unified address for the specified account that conforms
to the specified address filter, if the account identifier specified refers to a valid
account for this wallet. Read more
Source§fn get_account_birthday(
&self,
_account: Self::AccountId,
) -> Result<BlockHeight, Self::Error>
fn get_account_birthday( &self, _account: Self::AccountId, ) -> Result<BlockHeight, Self::Error>
Returns the birthday height for the given account, or an error if the account is not known
to the wallet.
Source§fn get_wallet_birthday(&self) -> Result<Option<BlockHeight>, Self::Error>
fn get_wallet_birthday(&self) -> Result<Option<BlockHeight>, Self::Error>
Returns the birthday height for the wallet. Read more
Source§fn get_wallet_recover_until(&self) -> Result<Option<BlockHeight>, Self::Error>
fn get_wallet_recover_until(&self) -> Result<Option<BlockHeight>, Self::Error>
Returns the height at which the wallet as a whole will have exited recovery mode. Read more
Source§fn get_wallet_summary(
&self,
_confirmations_policy: ConfirmationsPolicy,
) -> Result<Option<WalletSummary<Self::AccountId>>, Self::Error>
fn get_wallet_summary( &self, _confirmations_policy: ConfirmationsPolicy, ) -> Result<Option<WalletSummary<Self::AccountId>>, Self::Error>
Returns a
WalletSummary that represents the sync status and the wallet balances as of
the chain tip given the specified confirmation policy for all accounts known to the wallet,
or Ok(None) if the wallet has no summary data available.Source§fn chain_height(&self) -> Result<Option<BlockHeight>, Self::Error>
fn chain_height(&self) -> Result<Option<BlockHeight>, Self::Error>
Returns the height of the chain as known to the wallet as of the most recent call to
WalletWrite::update_chain_tip. Read moreSource§fn get_block_hash(
&self,
_block_height: BlockHeight,
) -> Result<Option<BlockHash>, Self::Error>
fn get_block_hash( &self, _block_height: BlockHeight, ) -> Result<Option<BlockHash>, Self::Error>
Returns the block hash for the block at the given height, if the
associated block data is available. Returns
Ok(None) if the hash
is not found in the database.Source§fn block_metadata(
&self,
_height: BlockHeight,
) -> Result<Option<BlockMetadata>, Self::Error>
fn block_metadata( &self, _height: BlockHeight, ) -> Result<Option<BlockMetadata>, Self::Error>
Returns the available block metadata for the block at the specified height, if any.
Source§fn block_fully_scanned(&self) -> Result<Option<BlockMetadata>, Self::Error>
fn block_fully_scanned(&self) -> Result<Option<BlockMetadata>, Self::Error>
Returns the metadata for the block at the height to which the wallet has been fully
scanned. Read more
Source§fn get_max_height_hash(
&self,
) -> Result<Option<(BlockHeight, BlockHash)>, Self::Error>
fn get_max_height_hash( &self, ) -> Result<Option<(BlockHeight, BlockHash)>, Self::Error>
Returns the block height and hash for the block at the maximum scanned block height. Read more
Source§fn block_max_scanned(&self) -> Result<Option<BlockMetadata>, Self::Error>
fn block_max_scanned(&self) -> Result<Option<BlockMetadata>, Self::Error>
Returns block metadata for the maximum height that the wallet has scanned. Read more
Source§fn suggest_scan_ranges(&self) -> Result<Vec<ScanRange>, Self::Error>
fn suggest_scan_ranges(&self) -> Result<Vec<ScanRange>, Self::Error>
Returns a vector of suggested scan ranges based upon the current wallet state. Read more
Source§fn get_target_and_anchor_heights(
&self,
_min_confirmations: NonZeroU32,
) -> Result<Option<(TargetHeight, BlockHeight)>, Self::Error>
fn get_target_and_anchor_heights( &self, _min_confirmations: NonZeroU32, ) -> Result<Option<(TargetHeight, BlockHeight)>, Self::Error>
Returns the default target height (for the block in which a new
transaction would be mined) and anchor height (to use for a new
transaction), given the range of block heights that the backend
knows about. Read more
Source§fn get_tx_height(&self, _txid: TxId) -> Result<Option<BlockHeight>, Self::Error>
fn get_tx_height(&self, _txid: TxId) -> Result<Option<BlockHeight>, Self::Error>
Returns the block height in which the specified transaction was mined, or
Ok(None) if the
transaction is not known to the wallet or not in the main chain.Source§fn get_unified_full_viewing_keys(
&self,
) -> Result<HashMap<Self::AccountId, UnifiedFullViewingKey>, Self::Error>
fn get_unified_full_viewing_keys( &self, ) -> Result<HashMap<Self::AccountId, UnifiedFullViewingKey>, Self::Error>
Returns all unified full viewing keys known to this wallet.
Source§fn get_memo(&self, _id_note: NoteId) -> Result<Option<Memo>, Self::Error>
fn get_memo(&self, _id_note: NoteId) -> Result<Option<Memo>, Self::Error>
Returns the memo for a note. Read more
Source§fn get_transaction(
&self,
_txid: TxId,
) -> Result<Option<Transaction>, Self::Error>
fn get_transaction( &self, _txid: TxId, ) -> Result<Option<Transaction>, Self::Error>
Returns the transaction with the given txid, if known to the wallet. Read more
Source§fn get_sapling_nullifiers(
&self,
_query: NullifierQuery,
) -> Result<Vec<(Self::AccountId, Nullifier)>, Self::Error>
fn get_sapling_nullifiers( &self, _query: NullifierQuery, ) -> Result<Vec<(Self::AccountId, Nullifier)>, Self::Error>
Returns the nullifiers for Sapling notes that the wallet is tracking, along with their
associated account IDs, that are either unspent or have not yet been confirmed as spent (in
that a spending transaction known to the wallet has not yet been included in a block).
Source§fn get_orchard_nullifiers(
&self,
_query: NullifierQuery,
) -> Result<Vec<(Self::AccountId, Nullifier)>, Self::Error>
fn get_orchard_nullifiers( &self, _query: NullifierQuery, ) -> Result<Vec<(Self::AccountId, Nullifier)>, Self::Error>
Available on crate feature
orchard only.Returns the nullifiers for Orchard notes that the wallet is tracking, along with their
associated account IDs, that are either unspent or have not yet been confirmed as spent (in
that a spending transaction known to the wallet has not yet been included in a block).
Source§fn get_ironwood_nullifiers(
&self,
_query: NullifierQuery,
) -> Result<Vec<(Self::AccountId, Nullifier)>, Self::Error>
fn get_ironwood_nullifiers( &self, _query: NullifierQuery, ) -> Result<Vec<(Self::AccountId, Nullifier)>, Self::Error>
Available on crate feature
orchard only.Returns the nullifiers for Ironwood notes that the wallet is tracking, along with their
associated account IDs, that are either unspent or have not yet been confirmed as spent.
Ironwood nullifiers are Orchard-shaped but are tracked as a separate pool. Read more
Source§fn get_unspent_transparent_outpoints(
&self,
) -> Result<HashMap<OutPoint, Self::AccountId>, Self::Error>
fn get_unspent_transparent_outpoints( &self, ) -> Result<HashMap<OutPoint, Self::AccountId>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the outpoints of the transparent outputs that the wallet holds and does not know
to have been spent, each mapped to the account that received it. Read more
Source§fn get_transparent_receiver_accounts(
&self,
) -> Result<HashMap<TransparentAddress, (Self::AccountId, Option<TransparentKeyScope>)>, Self::Error>
fn get_transparent_receiver_accounts( &self, ) -> Result<HashMap<TransparentAddress, (Self::AccountId, Option<TransparentKeyScope>)>, Self::Error>
Available on crate feature
transparent-inputs only.Returns every transparent receiver the wallet knows of, mapped to the account that
controls it and, for an HD-derived receiver, the change-level key scope used to derive it. Read more
Source§fn get_transparent_receivers(
&self,
_account: Self::AccountId,
_include_change: bool,
_include_standalone: bool,
) -> Result<HashMap<TransparentAddress, TransparentAddressMetadata>, Self::Error>
fn get_transparent_receivers( &self, _account: Self::AccountId, _include_change: bool, _include_standalone: bool, ) -> Result<HashMap<TransparentAddress, TransparentAddressMetadata>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the set of non-ephemeral transparent receivers associated with the given
account controlled by this wallet. Read more
Source§fn get_transparent_balances(
&self,
_account: Self::AccountId,
_target_height: TargetHeight,
_confirmations_policy: ConfirmationsPolicy,
) -> Result<TransparentBalances, Self::Error>
fn get_transparent_balances( &self, _account: Self::AccountId, _target_height: TargetHeight, _confirmations_policy: ConfirmationsPolicy, ) -> Result<TransparentBalances, Self::Error>
Available on crate feature
transparent-inputs only.Returns a mapping from each transparent receiver associated with the specified account
to the key scope for that address and the balance of funds given the specified target
height and confirmations policy.
Source§fn get_transparent_address_metadata(
&self,
_account: Self::AccountId,
_address: &TransparentAddress,
) -> Result<Option<TransparentAddressMetadata>, Self::Error>
fn get_transparent_address_metadata( &self, _account: Self::AccountId, _address: &TransparentAddress, ) -> Result<Option<TransparentAddressMetadata>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the metadata associated with a given transparent receiver in an account
controlled by this wallet, if available. Read more
Source§fn utxo_query_height(
&self,
_account: Self::AccountId,
) -> Result<BlockHeight, Self::Error>
fn utxo_query_height( &self, _account: Self::AccountId, ) -> Result<BlockHeight, Self::Error>
Available on crate feature
transparent-inputs only.Returns the maximum block height at which a transparent output belonging to the wallet has
been observed. Read more
Source§fn transaction_data_requests(
&self,
) -> Result<Vec<TransactionDataRequest>, Self::Error>
fn transaction_data_requests( &self, ) -> Result<Vec<TransactionDataRequest>, Self::Error>
Returns a vector of
TransactionDataRequest values that describe information needed by
the wallet to complete its view of transaction history. Read moreSource§fn get_received_outputs(
&self,
_txid: TxId,
_target_height: TargetHeight,
_confirmations_policy: ConfirmationsPolicy,
) -> Result<Vec<ReceivedTransactionOutput>, Self::Error>
fn get_received_outputs( &self, _txid: TxId, _target_height: TargetHeight, _confirmations_policy: ConfirmationsPolicy, ) -> Result<Vec<ReceivedTransactionOutput>, Self::Error>
Returns a vector of
ReceivedTransactionOutput values describing the outputs of the
specified transaction that were received by the wallet. The number of confirmations until
each received output will be considered spendable is determined based upon the specified
target height and confirmations policy.Source§fn anchor_retention_interval(&self) -> AnchorRetentionInterval
fn anchor_retention_interval(&self) -> AnchorRetentionInterval
Returns the interval on which this wallet retains note commitment tree checkpoints as
durable anchors. Read more
Source§fn pool_migration_params<P: Parameters>(
&self,
params: &P,
) -> PoolMigrationParams
fn pool_migration_params<P: Parameters>( &self, params: &P, ) -> PoolMigrationParams
Returns the ZIP 318 pool-migration parameters in force for this wallet on the network that
params describe: the specified values, with the anchor bucket grid taken from
Self::anchor_retention_interval. Read moreSource§fn get_ephemeral_transparent_receivers(
&self,
_account: Self::AccountId,
_exposure_depth: u32,
_exclude_used: bool,
) -> Result<HashMap<TransparentAddress, TransparentAddressMetadata>, Self::Error>
fn get_ephemeral_transparent_receivers( &self, _account: Self::AccountId, _exposure_depth: u32, _exclude_used: bool, ) -> Result<HashMap<TransparentAddress, TransparentAddressMetadata>, Self::Error>
Available on crate feature
transparent-inputs only.Returns the set of previously-exposed ephemeral transparent receivers generated by the given
account controlled by this wallet. Read more
Source§impl WalletWrite for MockWalletDb
impl WalletWrite for MockWalletDb
Source§fn put_received_transparent_utxo(
&mut self,
_output: &WalletTransparentOutput<<Self as WalletRead>::AccountId>,
) -> Result<Self::UtxoRef, <Self as WalletRead>::Error>
fn put_received_transparent_utxo( &mut self, _output: &WalletTransparentOutput<<Self as WalletRead>::AccountId>, ) -> Result<Self::UtxoRef, <Self as WalletRead>::Error>
Adds a transparent UTXO received by the wallet to the data store.
Source§fn create_account(
&mut self,
_account_name: &str,
seed: &SecretVec<u8>,
_birthday: &AccountBirthday,
_key_source: Option<&str>,
) -> Result<(<Self as WalletRead>::AccountId, UnifiedSpendingKey), <Self as WalletRead>::Error>
fn create_account( &mut self, _account_name: &str, seed: &SecretVec<u8>, _birthday: &AccountBirthday, _key_source: Option<&str>, ) -> Result<(<Self as WalletRead>::AccountId, UnifiedSpendingKey), <Self as WalletRead>::Error>
Source§fn import_account_hd(
&mut self,
_account_name: &str,
_seed: &SecretVec<u8>,
_account_index: AccountId,
_birthday: &AccountBirthday,
_key_source: Option<&str>,
) -> Result<(Self::Account, UnifiedSpendingKey), <Self as WalletRead>::Error>
fn import_account_hd( &mut self, _account_name: &str, _seed: &SecretVec<u8>, _account_index: AccountId, _birthday: &AccountBirthday, _key_source: Option<&str>, ) -> Result<(Self::Account, UnifiedSpendingKey), <Self as WalletRead>::Error>
Tells the wallet to track a specific account index for a given seed. Read more
Source§fn import_account_ufvk(
&mut self,
_account_name: &str,
_unified_key: &UnifiedFullViewingKey,
_birthday: &AccountBirthday,
_purpose: AccountPurpose,
_key_source: Option<&str>,
) -> Result<Self::Account, <Self as WalletRead>::Error>
fn import_account_ufvk( &mut self, _account_name: &str, _unified_key: &UnifiedFullViewingKey, _birthday: &AccountBirthday, _purpose: AccountPurpose, _key_source: Option<&str>, ) -> Result<Self::Account, <Self as WalletRead>::Error>
Tells the wallet to track an account using a unified full viewing key. Read more
Source§fn delete_account(
&mut self,
_account: <Self as WalletRead>::AccountId,
) -> Result<(), <Self as WalletRead>::Error>
fn delete_account( &mut self, _account: <Self as WalletRead>::AccountId, ) -> Result<(), <Self as WalletRead>::Error>
Deletes the specified account, and all transactions that exclusively involve it, from the
wallet database. Read more
Source§fn set_account_name(
&mut self,
_account: <Self as WalletRead>::AccountId,
_name: &str,
) -> Result<(), <Self as WalletRead>::Error>
fn set_account_name( &mut self, _account: <Self as WalletRead>::AccountId, _name: &str, ) -> Result<(), <Self as WalletRead>::Error>
Sets the human-readable name of the specified account, replacing any existing name. Read more
Source§fn import_standalone_transparent_pubkey(
&mut self,
_account: <Self as WalletRead>::AccountId,
_address: PublicKey,
) -> Result<(), <Self as WalletRead>::Error>
fn import_standalone_transparent_pubkey( &mut self, _account: <Self as WalletRead>::AccountId, _address: PublicKey, ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
transparent-key-import only.Imports the given pubkey into the account without key derivation information, and adds the
associated transparent p2pkh address. Read more
Source§fn import_standalone_transparent_script(
&mut self,
_account: <Self as WalletRead>::AccountId,
_script: Redeem,
) -> Result<(), <Self as WalletRead>::Error>
fn import_standalone_transparent_script( &mut self, _account: <Self as WalletRead>::AccountId, _script: Redeem, ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
transparent-key-import only.Imports the given redeem script into the account without key derivation information, and
adds the associated transparent p2sh address. Read more
Source§fn get_next_available_address(
&mut self,
_account: <Self as WalletRead>::AccountId,
_request: UnifiedAddressRequest,
) -> Result<Option<(UnifiedAddress, DiversifierIndex)>, <Self as WalletRead>::Error>
fn get_next_available_address( &mut self, _account: <Self as WalletRead>::AccountId, _request: UnifiedAddressRequest, ) -> Result<Option<(UnifiedAddress, DiversifierIndex)>, <Self as WalletRead>::Error>
Generates, persists, and marks as exposed the next available diversified address for the
specified account, given the current addresses known to the wallet. Read more
Source§fn get_address_for_index(
&mut self,
_account: <Self as WalletRead>::AccountId,
_diversifier_index: DiversifierIndex,
_request: UnifiedAddressRequest,
) -> Result<Option<UnifiedAddress>, <Self as WalletRead>::Error>
fn get_address_for_index( &mut self, _account: <Self as WalletRead>::AccountId, _diversifier_index: DiversifierIndex, _request: UnifiedAddressRequest, ) -> Result<Option<UnifiedAddress>, <Self as WalletRead>::Error>
Generates, persists, and marks as exposed a diversified address for the specified account
at the provided diversifier index. Read more
Source§fn put_blocks(
&mut self,
_from_state: &ChainState,
_blocks: Vec<ScannedBlock<<Self as WalletRead>::AccountId>>,
) -> Result<(), <Self as WalletRead>::Error>
fn put_blocks( &mut self, _from_state: &ChainState, _blocks: Vec<ScannedBlock<<Self as WalletRead>::AccountId>>, ) -> Result<(), <Self as WalletRead>::Error>
Updates the state of the wallet database by persisting the provided block information,
along with the note commitments that were detected when scanning the block for transactions
pertaining to this wallet. Read more
Source§fn update_chain_tip(
&mut self,
_tip_height: BlockHeight,
) -> Result<(), <Self as WalletRead>::Error>
fn update_chain_tip( &mut self, _tip_height: BlockHeight, ) -> Result<(), <Self as WalletRead>::Error>
Updates the wallet’s view of the blockchain. Read more
Source§fn prune_scan_queue_below(
&mut self,
_height: BlockHeight,
_retain_with_priority: Option<ScanPriority>,
) -> Result<u64, <Self as WalletRead>::Error>
fn prune_scan_queue_below( &mut self, _height: BlockHeight, _retain_with_priority: Option<ScanPriority>, ) -> Result<u64, <Self as WalletRead>::Error>
Drops the scan work queued below
height, except where retained by
retain_with_priority. Returns the number of queue entries removed or altered. Read moreSource§fn queue_rescan(
&mut self,
_range: Range<BlockHeight>,
) -> Result<(), <Self as WalletRead>::Error>
fn queue_rescan( &mut self, _range: Range<BlockHeight>, ) -> Result<(), <Self as WalletRead>::Error>
Queues
range to be scanned again, overriding the record of any part of it that has
already been scanned. Read moreSource§fn store_decrypted_tx(
&mut self,
_received_tx: DecryptedTransaction<'_, Transaction, <Self as WalletRead>::AccountId>,
) -> Result<(), <Self as WalletRead>::Error>
fn store_decrypted_tx( &mut self, _received_tx: DecryptedTransaction<'_, Transaction, <Self as WalletRead>::AccountId>, ) -> Result<(), <Self as WalletRead>::Error>
Caches a decrypted transaction in the persistent wallet store.
Source§fn set_tx_trust(
&mut self,
_txid: TxId,
_trusted: bool,
) -> Result<(), <Self as WalletRead>::Error>
fn set_tx_trust( &mut self, _txid: TxId, _trusted: bool, ) -> Result<(), <Self as WalletRead>::Error>
Sets the trust status of the given transaction to either trusted or untrusted. Read more
Source§fn store_transactions_to_be_sent(
&mut self,
_transactions: &[SentTransaction<'_, <Self as WalletRead>::AccountId>],
) -> Result<(), <Self as WalletRead>::Error>
fn store_transactions_to_be_sent( &mut self, _transactions: &[SentTransaction<'_, <Self as WalletRead>::AccountId>], ) -> Result<(), <Self as WalletRead>::Error>
Saves information about transactions constructed by the wallet to the persistent
wallet store. Read more
Source§fn truncate_to_height(
&mut self,
_block_height: BlockHeight,
) -> Result<BlockHeight, <Self as WalletRead>::Error>
fn truncate_to_height( &mut self, _block_height: BlockHeight, ) -> Result<BlockHeight, <Self as WalletRead>::Error>
Truncates the wallet database to at most the specified height. Read more
Source§fn truncate_to_chain_state(
&mut self,
_chain_state: ChainState,
) -> Result<(), <Self as WalletRead>::Error>
fn truncate_to_chain_state( &mut self, _chain_state: ChainState, ) -> Result<(), <Self as WalletRead>::Error>
Truncates the wallet database to the specified chain state. Read more
Source§fn rewind_to_chain_state(
&mut self,
_chain_state: ChainState,
_reset_account_birthdays: HashSet<<Self as WalletRead>::AccountId>,
) -> Result<(), RewindError<<Self as WalletRead>::AccountId, <Self as WalletRead>::Error>>
fn rewind_to_chain_state( &mut self, _chain_state: ChainState, _reset_account_birthdays: HashSet<<Self as WalletRead>::AccountId>, ) -> Result<(), RewindError<<Self as WalletRead>::AccountId, <Self as WalletRead>::Error>>
Rewinds the wallet to the specified chain state, preserving wallet data which has been
confirmed beyond the pruning depth, and lowering the birthday height of selected accounts
to the block following the chain state. Read more
Source§fn reserve_next_n_ephemeral_addresses(
&mut self,
_account_id: <Self as WalletRead>::AccountId,
_n: usize,
) -> Result<Vec<(TransparentAddress, TransparentAddressMetadata)>, <Self as WalletRead>::Error>
fn reserve_next_n_ephemeral_addresses( &mut self, _account_id: <Self as WalletRead>::AccountId, _n: usize, ) -> Result<Vec<(TransparentAddress, TransparentAddressMetadata)>, <Self as WalletRead>::Error>
Available on crate feature
transparent-inputs only.Reserves the next
n available ephemeral addresses for the given account.
This cannot be undone, so as far as possible, errors associated with transaction
construction should have been reported before calling this method. Read moreSource§fn reserve_next_n_internal_addresses(
&mut self,
_account_id: <Self as WalletRead>::AccountId,
_n: usize,
) -> Result<Vec<(TransparentAddress, TransparentAddressMetadata)>, <Self as WalletRead>::Error>
fn reserve_next_n_internal_addresses( &mut self, _account_id: <Self as WalletRead>::AccountId, _n: usize, ) -> Result<Vec<(TransparentAddress, TransparentAddressMetadata)>, <Self as WalletRead>::Error>
Available on crate feature
transparent-inputs only.Reserves the next
n available internal-scope (change) transparent addresses for
the given account, as described in BIP 44 under the change path level. This
cannot be undone, so as far as possible, errors associated with transaction
construction should have been reported before calling this method. Read moreSource§fn set_transaction_status(
&mut self,
_txid: TxId,
_status: TransactionStatus,
) -> Result<(), <Self as WalletRead>::Error>
fn set_transaction_status( &mut self, _txid: TxId, _status: TransactionStatus, ) -> Result<(), <Self as WalletRead>::Error>
Updates the wallet backend with respect to the status of a specific transaction, from the
perspective of the main chain. Read more
Source§fn notify_address_checked(
&mut self,
_request: TransactionsInvolvingAddress,
_as_of_height: BlockHeight,
) -> Result<(), <Self as WalletRead>::Error>
fn notify_address_checked( &mut self, _request: TransactionsInvolvingAddress, _as_of_height: BlockHeight, ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
transparent-inputs only.Notifies the wallet backend that the given query for transactions involving a particular
address has completed evaluation. Read more
Source§fn import_standalone_transparent_address(
&mut self,
_account: <Self as WalletRead>::AccountId,
_address: TransparentAddress,
) -> Result<(), <Self as WalletRead>::Error>
fn import_standalone_transparent_address( &mut self, _account: <Self as WalletRead>::AccountId, _address: TransparentAddress, ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
transparent-key-import only.Imports the given transparent address into the account as a watch-only address, without
any associated key material. Read more
Source§fn import_standalone_transparent_pubkeys(
&mut self,
account: <Self as WalletRead>::AccountId,
pubkeys: &[PublicKey],
) -> Result<(), <Self as WalletRead>::Error>
fn import_standalone_transparent_pubkeys( &mut self, account: <Self as WalletRead>::AccountId, pubkeys: &[PublicKey], ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
transparent-key-import only.Imports a batch of standalone transparent pubkeys into the account, adding the associated
transparent p2pkh addresses. See
import_standalone_transparent_pubkey for the semantics
and spending limitations that apply to each imported pubkey. Read moreSource§fn schedule_next_check(
&mut self,
_address: &TransparentAddress,
_offset_seconds: u32,
) -> Result<Option<SystemTime>, <Self as WalletRead>::Error>
fn schedule_next_check( &mut self, _address: &TransparentAddress, _offset_seconds: u32, ) -> Result<Option<SystemTime>, <Self as WalletRead>::Error>
Available on crate feature
transparent-inputs only.Schedules a UTXO check for the given address at a random time that has an expected value of
offset_seconds from the current system time. Read moreSource§fn mark_transparent_addresses_exposed(
&mut self,
_exposures: &[(TransparentAddress, BlockHeight)],
) -> Result<(), <Self as WalletRead>::Error>
fn mark_transparent_addresses_exposed( &mut self, _exposures: &[(TransparentAddress, BlockHeight)], ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
transparent-inputs only.Informs the wallet backend that the given transparent addresses are known to have been
exposed externally at or before the block height paired with each address. Read more
Source§fn notify_output_verified_unspent(
&mut self,
_outpoint: OutPoint,
_as_of_height: BlockHeight,
) -> Result<(), <Self as WalletRead>::Error>
fn notify_output_verified_unspent( &mut self, _outpoint: OutPoint, _as_of_height: BlockHeight, ) -> Result<(), <Self as WalletRead>::Error>
Available on crate feature
spend-index only.Notifies the wallet backend that a specific transparent output was confirmed unspent as of
the given height, in response to a
TransactionDataRequest::GetSpendingTx
request. Read moreAuto Trait Implementations§
impl Freeze for MockWalletDb
impl RefUnwindSafe for MockWalletDb
impl Send for MockWalletDb
impl Sync for MockWalletDb
impl Unpin for MockWalletDb
impl UnsafeUnpin for MockWalletDb
impl UnwindSafe for MockWalletDb
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].Source§impl<I> MetaSource for Iwhere
I: InputSource,
impl<I> MetaSource for Iwhere
I: InputSource,
type Error = <I as InputSource>::Error
type AccountId = <I as InputSource>::AccountId
type NoteRef = <I as InputSource>::NoteRef
Source§fn change_receivers(
&self,
account: <I as InputSource>::AccountId,
) -> Result<ChangeReceivers, <I as InputSource>::Error>
fn change_receivers( &self, account: <I as InputSource>::AccountId, ) -> Result<ChangeReceivers, <I as InputSource>::Error>
Returns the outputs in which the given account can receive change.
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PossiblyOption<T> for T
impl<T> PossiblyOption<T> for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.