pub struct ErgUsdOraclePoolBox { /* private fields */ }
Expand description

A specified box which is an Oracle Pool box that stores a Long integer datapoint inside of R4 that represents how many nanoErgs can be bought for 1 USD.

Implementations

WASM-compatible ErgUsdOraclePoolBox Methods

Extracts the Long datapoint out of register R4.

Extracts the Long datapoint out of register R4.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Using the response JSON (as a String) from the Ergo Explorer API endpoint generated by the explorer_endpoint() method, filter all returned ErgoBoxes against the default BoxSpec of the SpecifiedBox using the verify_box() method and creating new instances of your SpecifiedBox struct. Read more

Using the response JSON (as a String) from the Ergo Explorer API endpoint generated by the explorer_endpoint() method, filter all returned ErgoBoxes against a custom BoxSpec using the verify_box() method and creating new instances of your SpecifiedBox struct. Read more

Performs the conversion.

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

Recover a Self from Self::Abi. Read more

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

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

The wasm ABI type references to Self are recovered from.

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

Recover a Self::Anchor from Self::Abi. Read more

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

SpecifiedBox impl

A box spec for an Oracle Pool Box with the correct NFT + a Long value in R4

Verify that a provided ErgoBox matches the BoxSpec tied to your SpecifiedBox Read more

Generates a URL for the Ergo Explorer Backend API to find boxes which may match your BoxSpec. This method uses the explorer_api_url you provide as input which must be formatted as such: https://api.ergoplatform.com/api This method is intended to be used in tandem with process_explorer_response() Read more

Converts the WrappedBox into a DataInput

Converts the WrappedBox into an UnsignedInput

Returns the Box ID of the wrapped ErgoBox as a base16 String

Returns the amount of nanoErgs held in the wrapped ErgoBox as u64

Returns the registers of the wrapped ErgoBox as an ordered Vector of Constants. First element is R4, second element is R5, etc. Read more

Returns the Tokens inside of the wrapped ErgoBox

Returns the creation height of the wrapped ErgoBox

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Performs the conversion.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Same as IntoWasmAbi::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

Should always be Self

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Attempts to convert self into T using TryInto<T>. Read more

Extract value of the given type from any type (e.g. [‘Constant’], [super::value::Value]) on which [TryExtractFrom] is implemented Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.