pub struct IADB;Implementations§
Source§impl IADB
impl IADB
Sourcepub async fn get_data(
series_code: &SeriesCode,
date_from: &String,
date_to: &String,
) -> Result<IADBSeries, Error>
pub async fn get_data( series_code: &SeriesCode, date_from: &String, date_to: &String, ) -> Result<IADBSeries, Error>
Makes an API request to the IADB and deserializes the response into a time series.
§Input
series_code: Code of the time series in the IADB.date_from: Date from which the data will be extracted (Note: Date format is%d/%b/%Y)date_from: Date up to which the data will be extracted (Note: Date format is%d/%b/%Y)
§Examples
use iadb_api::{SeriesCode, schemas::IADBSeries, backend::IADB};
#[tokio::main]
async fn main() -> () {
// Parameters
let date_from: String = String::from("01/Jan/2000");
let date_to: String = String::from("01/Oct/2018");
// Data collection
let data: IADBSeries = IADB::get_data(&SeriesCode::IUDSOIA, &date_from, &date_to).await.unwrap();
println!("{}", data);
}Auto Trait Implementations§
impl Freeze for IADB
impl RefUnwindSafe for IADB
impl Send for IADB
impl Sync for IADB
impl Unpin for IADB
impl UnsafeUnpin for IADB
impl UnwindSafe for IADB
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