[−][src]Struct alpha_vantage::forex::Forex
Struct to store Forex data after forex API call
Methods
impl Forex
[src]
pub fn information(&self) -> Result<String, String>
[src]
Return information of data
use alpha_vantage::util::*; let api = alpha_vantage::set_api("demo"); let forex = api.forex( ForexFunction::IntraDay, "EUR", "USD", Interval::FiveMin, OutputSize::Full, ); let information = forex.information(); assert_eq!(information.unwrap(), "FX Intraday (5min) Time Series");
pub fn symbol_from(&self) -> Result<String, String>
[src]
Retrun from symbol
use alpha_vantage::util::*; let api = alpha_vantage::set_api("demo"); let forex = api.forex( ForexFunction::IntraDay, "EUR", "USD", Interval::FiveMin, OutputSize::Full, ); let symbol_from = forex.symbol_from(); assert_eq!(symbol_from.unwrap(), "EUR");
pub fn symbol_to(&self) -> Result<String, String>
[src]
Return to symbol
use alpha_vantage::util::*; let api = alpha_vantage::set_api("demo"); let forex = api.forex( ForexFunction::IntraDay, "EUR", "USD", Interval::FiveMin, OutputSize::Full, ); let symbol_to = forex.symbol_to(); assert_eq!(symbol_to.unwrap(), "USD");
pub fn last_refreshed(&self) -> Result<String, String>
[src]
Return last refreshed time with time zone
pub fn interval(&self) -> Result<String, String>
[src]
Return out interval for intraday
use alpha_vantage::util::*; let api = alpha_vantage::set_api("demo"); let forex = api.forex( ForexFunction::IntraDay, "EUR", "USD", Interval::FiveMin, OutputSize::Full, ); let interval = forex.interval(); assert_eq!(interval.unwrap(), "5min");
pub fn output_size(&self) -> Result<String, String>
[src]
Return output size which can be full or compact
use alpha_vantage::util::*; let api = alpha_vantage::set_api("demo"); let forex = api.forex( ForexFunction::IntraDay, "EUR", "USD", Interval::FiveMin, OutputSize::Full, ); let output_size = forex.output_size(); assert_eq!(output_size.unwrap(), "Full size");
pub fn entry(&self) -> Result<Vec<Entry>, String>
[src]
Method return Entry
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,