pub trait FiatService: Send + Sync {
// Required methods
fn fetch_fiat_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<FiatCurrency>, ServiceConnectivityError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fetch_fiat_rates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Rate>, ServiceConnectivityError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait covering fiat-related functionality
Required Methods§
Sourcefn fetch_fiat_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<FiatCurrency>, ServiceConnectivityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_fiat_currencies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<FiatCurrency>, ServiceConnectivityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all supported fiat currencies for which there is a known exchange rate.
Sourcefn fetch_fiat_rates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Rate>, ServiceConnectivityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_fiat_rates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Rate>, ServiceConnectivityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the live rates from the server.