[][src]Struct fred_rs::series::updates::Builder

pub struct Builder { /* fields omitted */ }

Methods

impl Builder[src]

pub fn new() -> Builder[src]

Initializes a new series::updates::Builder that can be used to add commands to an API request

The builder does not do validity checking of the arguments nor does it check for duplicates.

use fred_rs::series::updates::Builder;
// Create a new builder
let mut builder = Builder::new();
// add arguments to the builder
builder
    .realtime_start("1900-01-01")
    .realtime_end("2000-01-01");

pub fn realtime_start(&mut self, start_date: &str) -> &mut Builder[src]

Adds a realtime_start argument to the builder

Arguments

  • start_date - date formatted as YYYY-MM-DD

https://research.stlouisfed.org/docs/api/fred/series_updates.html#realtime_start

pub fn realtime_end(&mut self, end_date: &str) -> &mut Builder[src]

Adds a realtime_end argument to the builder

Arguments

  • end_date - date formatted as YYYY-MM-DD

pub fn limit(&mut self, num_results: usize) -> &mut Builder[src]

Adds a limit argument to the builder

The limit argument specifies a maximum number of observations to return.

Arguments

  • num_results - Maximum number of results to return

https://research.stlouisfed.org/docs/api/fred/series_updates.html#realtime_end

pub fn offset(&mut self, ofs: usize) -> &mut Builder[src]

Adds an offset argument to the builder

Adding an offset shifts the starting result number. For example, if limit is 5 and offset is 0 then results 1-5 will be returned, but if offset was 5 then results 6-10 would be returned.

Arguments

  • ofs - the offset amount

https://research.stlouisfed.org/docs/api/fred/series_updates.html#offset

pub fn filter_value(&mut self, value: FilterValue) -> &mut Builder[src]

Adds the filter_value argument to the request

Arguments

  • value - value with which to filter results

https://research.stlouisfed.org/docs/api/fred/series_updates.html#filter_value

pub fn time_range(&mut self, start_time: &str, end_time: &str) -> &mut Builder[src]

Limit results to a certian time range

Both a start and end time must be specified together as per the API docs.

Arguments

  • start_time - Start time to limit results to (YYYYMMDDHhmm format)
  • end_time - End time to limit results to (YYYYMMDDHhmm format)

https://research.stlouisfed.org/docs/api/fred/series_updates.html#start_time

https://research.stlouisfed.org/docs/api/fred/series_updates.html#end_time

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.