Struct price_info::Client[][src]

pub struct Client<F = FetchClient> { /* fields omitted */ }

A client to get the current VAP price using an external API.

Implementations

impl<F: Fetch> Client<F>[src]

pub fn new(fetch: F, pool: Executor, api_endpoint: String) -> Client<F>[src]

Creates a new instance of the Client given a tetsy_fetch::Client.

pub fn get<G: FnOnce(PriceInfo) + Sync + Send + 'static>(&self, set_price: G)[src]

Gets the current VAP price and calls set_price with the result.

Trait Implementations

impl<F> Debug for Client<F>[src]

impl<F> PartialEq<Client<F>> for Client<F>[src]

Auto Trait Implementations

impl<F = Client> !RefUnwindSafe for Client<F>

impl<F> Send for Client<F> where
    F: Send

impl<F> Sync for Client<F> where
    F: Sync

impl<F> Unpin for Client<F> where
    F: Unpin

impl<F = Client> !UnwindSafe for Client<F>

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<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.