Struct price_info::Client [−][src]
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
Auto Trait Implementations
impl<F = Client> !RefUnwindSafe for Client<F>
impl<F> Send for Client<F> where
F: Send,
F: Send,
impl<F> Sync for Client<F> where
F: Sync,
F: Sync,
impl<F> Unpin for Client<F> where
F: Unpin,
F: Unpin,
impl<F = Client> !UnwindSafe for Client<F>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,