pub struct GetExchangeRateParams {
pub symbol: String,
pub date: Option<String>,
pub format: Option<String>,
pub delimiter: Option<String>,
pub dp: Option<i64>,
pub timezone: Option<String>,
}Expand description
struct for passing parameters to the method get_exchange_rate
Fields§
§symbol: StringThe currency pair you want to request can be either forex or cryptocurrency. Slash(/) delimiter is used. E.g. EUR/USD or BTC/ETH will be correct
date: Option<String>If not null, will use exchange rate from a specific date or time. Format 2006-01-02 or 2006-01-02T15:04:05. Is set in the local exchange time zone, use timezone parameter to specify a specific time zone
format: Option<String>Value can be JSON or CSV. Default JSON
delimiter: Option<String>Specify the delimiter used when downloading the CSV file. Default semicolon ;
dp: Option<i64>The number of decimal places for the data
timezone: Option<String>Timezone at which output datetime will be displayed. Supports:
- 1.
Exchangefor local exchange time - 2.
UTCfor datetime at universal UTC standard - 3. Timezone name according to the IANA Time Zone Database. E.g.
America/New_York,Asia/Singapore. Full list of timezones can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="blank">here.
Implementations§
Source§impl GetExchangeRateParams
impl GetExchangeRateParams
Sourcepub fn builder() -> GetExchangeRateParamsBuilder
pub fn builder() -> GetExchangeRateParamsBuilder
Create a new builder for this parameter struct
Trait Implementations§
Source§impl Clone for GetExchangeRateParams
impl Clone for GetExchangeRateParams
Source§fn clone(&self) -> GetExchangeRateParams
fn clone(&self) -> GetExchangeRateParams
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 GetExchangeRateParams
impl Debug for GetExchangeRateParams
Source§impl Default for GetExchangeRateParams
impl Default for GetExchangeRateParams
Source§fn default() -> GetExchangeRateParams
fn default() -> GetExchangeRateParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GetExchangeRateParams
impl<'de> Deserialize<'de> for GetExchangeRateParams
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
Auto Trait Implementations§
impl Freeze for GetExchangeRateParams
impl RefUnwindSafe for GetExchangeRateParams
impl Send for GetExchangeRateParams
impl Sync for GetExchangeRateParams
impl Unpin for GetExchangeRateParams
impl UnwindSafe for GetExchangeRateParams
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