[][src]Struct ergo_headless_dapp_framework::specified_boxes::ErgsBox

pub struct ErgsBox { /* fields omitted */ }

A specified box which is intended to be spent for the Ergs inside. The spec simply requires the box to simply have at least 1000000 nanoErgs inside.

Implementations

impl ErgsBox[src]

impl ErgsBox[src]

pub fn w_new(ergo_box: WErgoBox) -> Result<ErgsBox, JsValue>[src]

pub fn w_box_spec(&self) -> BoxSpec[src]

pub fn w_process_explorer_response(
    explorer_response_body: &str
) -> Result<Vec<JsValue>, JsValue>
[src]

pub fn w_explorer_endpoint(explorer_api_url: &str) -> Result<String, JsValue>[src]

impl ErgsBox[src]

Rust ErgsBox Methods

pub fn convert_from_ergo_boxes(ergo_boxes: &ErgoBoxes) -> Result<Vec<ErgsBox>>[src]

Converts from the WASM wrapper ErgoBoxes into a vector of ErgsBoxes.

pub fn sum_ergs_boxes_value(boxes: &Vec<ErgsBox>) -> u64[src]

Sums the nanoErg value of a list of ErgsBoxes

Trait Implementations

impl Clone for ErgsBox[src]

impl Debug for ErgsBox[src]

impl Eq for ErgsBox[src]

impl ExplorerFindable for ErgsBox[src]

impl From<ErgsBox> for JsValue[src]

impl FromWasmAbi for ErgsBox[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for ErgsBox[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl OptionFromWasmAbi for ErgsBox[src]

impl OptionIntoWasmAbi for ErgsBox[src]

impl PartialEq<ErgsBox> for ErgsBox[src]

impl RefFromWasmAbi for ErgsBox[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

type Anchor = Ref<'static, ErgsBox>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl RefMutFromWasmAbi for ErgsBox[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

type Anchor = RefMut<'static, ErgsBox>

Same as RefFromWasmAbi::Anchor

impl SpecifiedBox for ErgsBox[src]

SpecifiedBox impl

pub fn box_spec() -> BoxSpec[src]

A simple BoxSpec that just checks the value of nanoErgs is above 1000000

impl StructuralEq for ErgsBox[src]

impl StructuralPartialEq for ErgsBox[src]

impl WasmDescribe for ErgsBox[src]

impl WrappedBox for ErgsBox[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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,