pub struct WalletCache<L2>where
L2: Layer2Cache,{
pub last_block: MiningInfo,
pub last_change: NormalIndex,
pub headers: BTreeSet<BlockInfo>,
pub tx: BTreeMap<Txid, WalletTx>,
pub utxo: BTreeSet<Outpoint>,
pub addr: BTreeMap<Keychain, BTreeSet<WalletAddr>>,
pub layer2: L2,
}
Fields§
§last_block: MiningInfo
§last_change: NormalIndex
§headers: BTreeSet<BlockInfo>
§tx: BTreeMap<Txid, WalletTx>
§utxo: BTreeSet<Outpoint>
§addr: BTreeMap<Keychain, BTreeSet<WalletAddr>>
§layer2: L2
Implementations§
Source§impl<L2> WalletCache<L2>where
L2: Layer2Cache,
impl<L2> WalletCache<L2>where
L2: Layer2Cache,
Source§impl<L2C> WalletCache<L2C>where
L2C: Layer2Cache,
impl<L2C> WalletCache<L2C>where
L2C: Layer2Cache,
pub fn with<I, K, D, L2>( descriptor: &WalletDescr<K, D, <L2 as Layer2>::Descr>, indexer: &I, ) -> MayError<WalletCache<L2C>, Vec<<I as Indexer>::Error>>
pub fn update<I, K, D, L2>( &mut self, descriptor: &WalletDescr<K, D, <L2 as Layer2>::Descr>, indexer: &I, ) -> MayError<usize, Vec<<I as Indexer>::Error>>
pub fn addresses_on(&self, keychain: Keychain) -> &BTreeSet<WalletAddr>
pub fn utxo(&self, outpoint: Outpoint) -> Result<WalletUtxo, NonWalletItem>
pub fn all_utxos(&self) -> impl Iterator<Item = WalletUtxo>
Trait Implementations§
Source§impl<L2> Clone for WalletCache<L2>where
L2: Clone + Layer2Cache,
impl<L2> Clone for WalletCache<L2>where
L2: Clone + Layer2Cache,
Source§fn clone(&self) -> WalletCache<L2>
fn clone(&self) -> WalletCache<L2>
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<L2> Debug for WalletCache<L2>where
L2: Debug + Layer2Cache,
impl<L2> Debug for WalletCache<L2>where
L2: Debug + Layer2Cache,
Source§impl<L2> Default for WalletCache<L2>where
L2: Layer2Cache,
impl<L2> Default for WalletCache<L2>where
L2: Layer2Cache,
Source§fn default() -> WalletCache<L2>
fn default() -> WalletCache<L2>
Returns the “default value” for a type. Read more
Source§impl<'de, L2> Deserialize<'de> for WalletCache<L2>where
L2: Layer2Cache + Deserialize<'de>,
impl<'de, L2> Deserialize<'de> for WalletCache<L2>where
L2: Layer2Cache + Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WalletCache<L2>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WalletCache<L2>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<L2> PartialEq for WalletCache<L2>where
L2: PartialEq + Layer2Cache,
impl<L2> PartialEq for WalletCache<L2>where
L2: PartialEq + Layer2Cache,
Source§impl<L2> Serialize for WalletCache<L2>where
L2: Layer2Cache + Serialize,
impl<L2> Serialize for WalletCache<L2>where
L2: Layer2Cache + Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<L2> Eq for WalletCache<L2>where
L2: Eq + Layer2Cache,
impl<L2> StructuralPartialEq for WalletCache<L2>where
L2: Layer2Cache,
Auto Trait Implementations§
impl<L2> Freeze for WalletCache<L2>where
L2: Freeze,
impl<L2> RefUnwindSafe for WalletCache<L2>where
L2: RefUnwindSafe,
impl<L2> Send for WalletCache<L2>where
L2: Send,
impl<L2> Sync for WalletCache<L2>where
L2: Sync,
impl<L2> Unpin for WalletCache<L2>where
L2: Unpin,
impl<L2> UnwindSafe for WalletCache<L2>where
L2: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.