pub struct ReleaseDatesRequest<'a> { /* private fields */ }Expand description
A builder for the release-date endpoints, returned by
Client::releases_dates (fred/releases/dates, the publication dates of
every release) and Client::release_dates (fred/release/dates, the
dates of one release). Both share optional sort, paging, and the
“include dates with no data” toggle and return ReleaseDatesResults;
release_dates additionally carries the release_id. Finish with
send.
let calendar = client.releases_dates().limit(20).send().await?;
println!("{} release dates", calendar.count);Implementations§
Source§impl<'a> ReleaseDatesRequest<'a>
impl<'a> ReleaseDatesRequest<'a>
Sourcepub fn sort_order(self, order: SortOrder) -> Self
pub fn sort_order(self, order: SortOrder) -> Self
Sort order of the dates (sort_order).
Sourcepub fn offset(self, offset: u32) -> Self
pub fn offset(self, offset: u32) -> Self
Number of results to skip from the start (offset), for paging.
Sourcepub fn include_dates_with_no_data(self, include: bool) -> Self
pub fn include_dates_with_no_data(self, include: bool) -> Self
Include release dates for which no observations have yet been released
(include_release_dates_with_no_data) — e.g. a scheduled future date.
FRED omits these by default.
Sourcepub async fn send(self) -> Result<ReleaseDatesResults>
pub async fn send(self) -> Result<ReleaseDatesResults>
Run the request and return a page of release dates with pagination metadata.
§Errors
Returns an error if the request fails to send, FRED returns a non-success status, or the response body cannot be deserialized.
Trait Implementations§
Source§impl<'a> Clone for ReleaseDatesRequest<'a>
impl<'a> Clone for ReleaseDatesRequest<'a>
Source§fn clone(&self) -> ReleaseDatesRequest<'a>
fn clone(&self) -> ReleaseDatesRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for ReleaseDatesRequest<'a>
impl<'a> Debug for ReleaseDatesRequest<'a>
Source§impl Paginate for ReleaseDatesRequest<'_>
impl Paginate for ReleaseDatesRequest<'_>
Source§const MAX_PAGE: u32 = 10_000
const MAX_PAGE: u32 = 10_000
limit it
honors. 1000 for most lists; 10000 for release dates and vintage dates.Source§type Page = ReleaseDatesResults
type Page = ReleaseDatesResults
Source§fn requested_limit(&self) -> Option<u32>
fn requested_limit(&self) -> Option<u32>
limit, if set. send_all
treats it as a ceiling on the total number of items returned.Source§fn requested_offset(&self) -> Option<u32>
fn requested_offset(&self) -> Option<u32>
offset, if set — the point
send_all starts paging from.Source§fn with_paging(self, limit: u32, offset: u32) -> Self
fn with_paging(self, limit: u32, offset: u32) -> Self
limit and offset set.Source§fn send_page(self) -> impl Future<Output = Result<Self::Page>> + Send
fn send_page(self) -> impl Future<Output = Result<Self::Page>> + Send
send.