pub struct SingleQuoteResponse { /* private fields */ }Expand description
Single quote response from the Odos quote API: https://docs.odos.xyz/build/api-docs
Implementations§
Source§impl SingleQuoteResponse
impl SingleQuoteResponse
Sourcepub fn data_gas_estimate(&self) -> u64
pub fn data_gas_estimate(&self) -> u64
Get the data gas estimate of the quote
Sourcepub fn get_block_number(&self) -> u64
pub fn get_block_number(&self) -> u64
Get the block number of the quote
Sourcepub fn gas_estimate(&self) -> f64
pub fn gas_estimate(&self) -> f64
Get the gas estimate of the quote
Sourcepub fn in_amounts_iter(&self) -> impl Iterator<Item = &String>
pub fn in_amounts_iter(&self) -> impl Iterator<Item = &String>
Get the in amounts of the quote
Sourcepub fn in_amount_u256(&self) -> Result<U256>
pub fn in_amount_u256(&self) -> Result<U256>
Get the in amount of the quote
Sourcepub fn out_amount(&self) -> Option<&String>
pub fn out_amount(&self) -> Option<&String>
Get the out amount of the quote
Sourcepub fn out_amounts_iter(&self) -> impl Iterator<Item = &String>
pub fn out_amounts_iter(&self) -> impl Iterator<Item = &String>
Get the out amounts of the quote
Sourcepub fn in_tokens_iter(&self) -> impl Iterator<Item = &Address>
pub fn in_tokens_iter(&self) -> impl Iterator<Item = &Address>
Get the in tokens of the quote
Sourcepub fn first_in_token(&self) -> Option<&Address>
pub fn first_in_token(&self) -> Option<&Address>
Get the in token of the quote
pub fn out_tokens_iter(&self) -> impl Iterator<Item = &Address>
Sourcepub fn first_out_token(&self) -> Option<&Address>
pub fn first_out_token(&self) -> Option<&Address>
Get the out token of the quote
Sourcepub fn out_values_iter(&self) -> impl Iterator<Item = &f64>
pub fn out_values_iter(&self) -> impl Iterator<Item = &f64>
Get the out values of the quote
Sourcepub fn path_definition_as_vec_u8(&self) -> Vec<u8> ⓘ
pub fn path_definition_as_vec_u8(&self) -> Vec<u8> ⓘ
Get the path id as a vector of bytes
Sourcepub fn swap_input_token_and_amount(&self) -> Result<(Address, U256)>
pub fn swap_input_token_and_amount(&self) -> Result<(Address, U256)>
Get the swap input token and amount
Sourcepub fn price_impact(&self) -> f64
pub fn price_impact(&self) -> f64
Get the price impact of the quote
Trait Implementations§
Source§impl Clone for SingleQuoteResponse
impl Clone for SingleQuoteResponse
Source§fn clone(&self) -> SingleQuoteResponse
fn clone(&self) -> SingleQuoteResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingleQuoteResponse
impl Debug for SingleQuoteResponse
Source§impl<'de> Deserialize<'de> for SingleQuoteResponse
impl<'de> Deserialize<'de> for SingleQuoteResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SingleQuoteResponse
impl PartialEq for SingleQuoteResponse
Source§impl PartialOrd for SingleQuoteResponse
impl PartialOrd for SingleQuoteResponse
Source§impl Serialize for SingleQuoteResponse
impl Serialize for SingleQuoteResponse
impl StructuralPartialEq for SingleQuoteResponse
Auto Trait Implementations§
impl Freeze for SingleQuoteResponse
impl RefUnwindSafe for SingleQuoteResponse
impl Send for SingleQuoteResponse
impl Sync for SingleQuoteResponse
impl Unpin for SingleQuoteResponse
impl UnwindSafe for SingleQuoteResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more