pub struct ExchangeRate {
pub base_asset: Asset,
pub quote_asset: Asset,
pub timestamp: u64,
pub rate: u64,
pub metadata: ExchangeRateMetadata,
}Expand description
When a rate is determined, this struct is used to present the information to the user.
Fields§
§base_asset: AssetThe base asset.
quote_asset: AssetThe quote asset.
timestamp: u64The timestamp associated with the returned rate.
rate: u64The median rate from the received rates, scaled by the factor 10^decimals in the metadata.
metadata: ExchangeRateMetadataMetadata providing additional information about the exchange rate calculation.
Trait Implementations§
Source§impl CandidType for ExchangeRate
impl CandidType for ExchangeRate
Source§impl Clone for ExchangeRate
impl Clone for ExchangeRate
Source§fn clone(&self) -> ExchangeRate
fn clone(&self) -> ExchangeRate
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 ExchangeRate
impl Debug for ExchangeRate
Source§impl<'de> Deserialize<'de> for ExchangeRate
impl<'de> Deserialize<'de> for ExchangeRate
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 ExchangeRate
impl PartialEq for ExchangeRate
impl StructuralPartialEq for ExchangeRate
Auto Trait Implementations§
impl Freeze for ExchangeRate
impl RefUnwindSafe for ExchangeRate
impl Send for ExchangeRate
impl Sync for ExchangeRate
impl Unpin for ExchangeRate
impl UnwindSafe for ExchangeRate
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