[][src]Struct komodo_airdrop::SnapshotBuilder

pub struct SnapshotBuilder { /* fields omitted */ }

Methods

impl SnapshotBuilder[src]

pub fn on_chain(&mut self, chain: Chain) -> &mut Self[src]

Specify the Komodo (asset)chain to take a snapshot from.

pub fn using_threshold(&mut self, threshold: f64) -> &mut Self[src]

Set a threshold, such that all addresses contain at least the specified threshold.

pub fn max_addresses(&mut self, max: u32) -> &mut Self[src]

Include only the top max addresses in the snapshot. A max of 10 gives a snapshot of the top 10 addresses, based on their balance on their chain.

pub fn exclude_addresses(&mut self, addresses: Vec<String>) -> &mut Self[src]

Removes the addresses specified here from the Snapshot, if they exist in the Snapshot.

pub fn build(&self) -> Result<Snapshot, AirdropError>[src]

Builds a Snapshot struct. Here is where the threshold is applied and excluded addresses are removed, if any.

Trait Implementations

impl Default for SnapshotBuilder[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, 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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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