Struct ergo_lib::wallet::box_selector::SimpleBoxSelector [−][src]
pub struct SimpleBoxSelector {}
Expand description
Simple box selector, collects inputs(sorted by targeted assets) until target balance is reached
Implementations
Trait Implementations
impl<T: ErgoBoxAssets> BoxSelector<T> for SimpleBoxSelector
[src]
impl<T: ErgoBoxAssets> BoxSelector<T> for SimpleBoxSelector
[src]fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
[src]
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.
Auto Trait Implementations
impl RefUnwindSafe for SimpleBoxSelector
impl Send for SimpleBoxSelector
impl Sync for SimpleBoxSelector
impl Unpin for SimpleBoxSelector
impl UnwindSafe for SimpleBoxSelector
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<F> TryExtractInto<F> for F
[src]
impl<F> TryExtractInto<F> for F
[src]pub fn try_extract_into<T>(self) -> Result<T, TryExtractFromError> where
T: TryExtractFrom<F>,
[src]
pub fn try_extract_into<T>(self) -> Result<T, TryExtractFromError> where
T: TryExtractFrom<F>,
[src]Extract value of the given type from any type (e.g. [‘Constant’], super::value::Value
)
on which TryExtractFrom
is implemented Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,