Skip to main content

Exchange

Trait Exchange 

Source
pub trait Exchange: Send {
    // Required method
    fn query_zec_to_usd(
        &self,
        client: &Client,
    ) -> impl Future<Output = Result<ExchangeData, Error>> + Send;
}
Available on crate feature tor only.
Expand description

An exchange that can be queried for ZEC data.

Required Methods§

Source

fn query_zec_to_usd( &self, client: &Client, ) -> impl Future<Output = Result<ExchangeData, Error>> + Send

Queries data about the USD/ZEC pair.

The returned bid and ask data must be denominated in USD, i.e. the latest bid and ask for 1 ZEC.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<DYNOSAUR> Exchange for &DYNOSAUR
where DYNOSAUR: ?Sized + Exchange, Self: Send,

Source§

fn query_zec_to_usd( &self, client: &Client, ) -> impl Future<Output = Result<ExchangeData, Error>> + Send

Source§

impl<DYNOSAUR> Exchange for &mut DYNOSAUR
where DYNOSAUR: ?Sized + Exchange, Self: Send,

Source§

fn query_zec_to_usd( &self, client: &Client, ) -> impl Future<Output = Result<ExchangeData, Error>> + Send

Source§

impl<DYNOSAUR> Exchange for Box<DYNOSAUR>
where DYNOSAUR: ?Sized + Exchange, Self: Send,

Source§

fn query_zec_to_usd( &self, client: &Client, ) -> impl Future<Output = Result<ExchangeData, Error>> + Send

Implementors§