pub trait NotesSelector<Note = SpendableNoteUndecoded>: Send + Sync {
// Required method
fn select_notes<'life0, 'async_trait>(
&'life0 self,
stream: impl 'async_trait + Stream<Item = (Amount, Note)> + Send,
requested_amount: Amount,
fee_per_note_input: Amount,
) -> Pin<Box<dyn Future<Output = Result<TieredMulti<Note>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Defines a strategy for selecting e-cash notes given a specific target amount and fee per note transaction input.
Required Methods§
Sourcefn select_notes<'life0, 'async_trait>(
&'life0 self,
stream: impl 'async_trait + Stream<Item = (Amount, Note)> + Send,
requested_amount: Amount,
fee_per_note_input: Amount,
) -> Pin<Box<dyn Future<Output = Result<TieredMulti<Note>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn select_notes<'life0, 'async_trait>(
&'life0 self,
stream: impl 'async_trait + Stream<Item = (Amount, Note)> + Send,
requested_amount: Amount,
fee_per_note_input: Amount,
) -> Pin<Box<dyn Future<Output = Result<TieredMulti<Note>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Select notes from stream for requested_amount. The stream must produce items in non- decreasing order of amount.
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.