[][src]Struct ergo_lib::wallet::box_selector::SimpleBoxSelector

pub struct SimpleBoxSelector {}

Naive box selector, collects inputs until target balance is reached

Implementations

impl SimpleBoxSelector[src]

pub fn new() -> Self[src]

Create new boxed instance

Trait Implementations

impl<T: ErgoBoxAssets> BoxSelector<T> for SimpleBoxSelector[src]

pub fn select(
    &self,
    inputs: Vec<T>,
    target_balance: BoxValue,
    target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
[src]

Selects inputs to satisfy target balance and tokens. inputs - available inputs (returns an error, if empty), target_balance - coins (in nanoERGs) needed, target_tokens - amount of tokens needed. Returns selected inputs and box assets(value+tokens) with change.

impl Default for SimpleBoxSelector[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<F> TryExtractInto<F> for F[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,