[][src]Trait ergo_headless_dapp_framework::box_traits::ExplorerFindable

pub trait ExplorerFindable: SpecifiedBox {
    pub fn process_explorer_response(
        explorer_response_body: &str
    ) -> Result<Vec<Self>>
    where
        Self: Sized
;
pub fn process_explorer_response_custom(
        explorer_response_body: &str,
        box_spec: BoxSpec
    ) -> Result<Vec<Self>>
    where
        Self: Sized
; }

A trait which is implemented via deriving the procedural macro SpecBox. This trait wraps the below methods from BoxSpec but instead returns the Self struct that implements SpecifiedBox improving the dev experience. A separate trait + using a proc macro was required due to a few intricacies of Rust's trait/type system

Required methods

pub fn process_explorer_response(
    explorer_response_body: &str
) -> Result<Vec<Self>> where
    Self: Sized
[src]

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.

pub fn process_explorer_response_custom(
    explorer_response_body: &str,
    box_spec: BoxSpec
) -> Result<Vec<Self>> where
    Self: Sized
[src]

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.

Loading content...

Implementors

impl ExplorerFindable for AdaUsdOraclePoolBox[src]

impl ExplorerFindable for ErgUsdOraclePoolBox[src]

impl ExplorerFindable for ErgsBox[src]

Loading content...