pub trait FilterVtxos: Send + Sync {
// Required method
fn matches<'life0, 'life1, 'async_trait>(
&'life0 self,
vtxo: &'life1 WalletVtxo,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn filter_vtxos<'life0, 'life1, 'async_trait, V>(
&'life0 self,
vtxos: &'life1 mut Vec<V>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where V: 'async_trait + Borrow<WalletVtxo> + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait needed to be implemented to filter wallet VTXOs.
See Wallet::vtxos_with. For easy filtering, see VtxoFilter.
This trait is also implemented for Fn(&WalletVtxo) -> anyhow::Result<bool>.
Required Methods§
Provided Methods§
Sourcefn filter_vtxos<'life0, 'life1, 'async_trait, V>(
&'life0 self,
vtxos: &'life1 mut Vec<V>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
V: 'async_trait + Borrow<WalletVtxo> + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn filter_vtxos<'life0, 'life1, 'async_trait, V>(
&'life0 self,
vtxos: &'life1 mut Vec<V>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
V: 'async_trait + Borrow<WalletVtxo> + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Eliminate from the vector all non-matching VTXOs
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.