[−][src]Trait ergo_headless_dapp_framework::box_traits::ExplorerFindable
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]
explorer_response_body: &str
) -> Result<Vec<Self>> where
Self: Sized,
Using the response JSON (as a String) from the Ergo Explorer API
endpoint generated by the explorer_endpoint()
method,
filter all returned ErgoBox
es 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]
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<Self>> where
Self: Sized,
Using the response JSON (as a String) from the Ergo Explorer API
endpoint generated by the explorer_endpoint()
method,
filter all returned ErgoBox
es against a custom BoxSpec
using the verify_box()
method and creating new instances
of your SpecifiedBox
struct.
Implementors
impl ExplorerFindable for AdaUsdOraclePoolBox
[src]
pub fn process_explorer_response(
explorer_response_body: &str
) -> Result<Vec<AdaUsdOraclePoolBox>, HeadlessDappError>
[src]
explorer_response_body: &str
) -> Result<Vec<AdaUsdOraclePoolBox>, HeadlessDappError>
pub fn process_explorer_response_custom(
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<AdaUsdOraclePoolBox>, HeadlessDappError>
[src]
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<AdaUsdOraclePoolBox>, HeadlessDappError>
impl ExplorerFindable for ErgUsdOraclePoolBox
[src]
pub fn process_explorer_response(
explorer_response_body: &str
) -> Result<Vec<ErgUsdOraclePoolBox>, HeadlessDappError>
[src]
explorer_response_body: &str
) -> Result<Vec<ErgUsdOraclePoolBox>, HeadlessDappError>
pub fn process_explorer_response_custom(
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<ErgUsdOraclePoolBox>, HeadlessDappError>
[src]
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<ErgUsdOraclePoolBox>, HeadlessDappError>
impl ExplorerFindable for ErgsBox
[src]
pub fn process_explorer_response(
explorer_response_body: &str
) -> Result<Vec<ErgsBox>, HeadlessDappError>
[src]
explorer_response_body: &str
) -> Result<Vec<ErgsBox>, HeadlessDappError>
pub fn process_explorer_response_custom(
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<ErgsBox>, HeadlessDappError>
[src]
explorer_response_body: &str,
box_spec: BoxSpec
) -> Result<Vec<ErgsBox>, HeadlessDappError>