pub struct LiFi { /* private fields */ }
Implementations§
Source§impl LiFi
impl LiFi
pub fn new(api_key: Option<String>) -> Self
pub async fn get_chains(&self) -> Result<ChainsResponse, LiFiError>
pub async fn get_tools( &self, chains: &[String], ) -> Result<ToolsResponse, LiFiError>
pub async fn get_tokens( &self, chains: &str, chain_types: Option<&str>, min_price_usd: Option<f64>, ) -> Result<TokensResponse, LiFiError>
pub async fn get_token( &self, chain: &str, token: &str, ) -> Result<Token, LiFiError>
pub async fn get_connections( &self, from_chain: Option<&str>, to_chain: Option<&str>, from_token: Option<&str>, to_token: Option<&str>, ) -> Result<ConnectionsResponse, LiFiError>
pub async fn get_quote( &self, from_chain: &str, to_chain: &str, from_token: &str, to_token: &str, from_address: &str, to_address: &str, from_amount_with_decimals: &str, ) -> Result<QuoteResponse, LiFiError>
Auto Trait Implementations§
impl Freeze for LiFi
impl !RefUnwindSafe for LiFi
impl Send for LiFi
impl Sync for LiFi
impl Unpin for LiFi
impl !UnwindSafe for LiFi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more