pub struct SeriesListRequest<'a> { /* private fields */ }Expand description
A builder for the FRED endpoints that return a page of series filtered by a
single facet: category/series, release/series, and tags/series. They
share the same optional ordering and paging and all return
SeriesSearchResults; they differ only in the endpoint path and the one
facet parameter (category_id / release_id / tag_names).
Construct one via Client::category_series, Client::release_series, or
Client::tags_series; finish with send.
use ferric_fred::{OrderBy, ReleaseId};
let results = client
.release_series(ReleaseId::new(53))
.order_by(OrderBy::Popularity)
.limit(10)
.send()
.await?;
println!("{} series", results.count);Implementations§
Source§impl<'a> SeriesListRequest<'a>
impl<'a> SeriesListRequest<'a>
Sourcepub fn sort_order(self, order: SortOrder) -> Self
pub fn sort_order(self, order: SortOrder) -> Self
Sort order of the results (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 async fn send(self) -> Result<SeriesSearchResults>
pub async fn send(self) -> Result<SeriesSearchResults>
Run the request and return the matching series 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 SeriesListRequest<'a>
impl<'a> Clone for SeriesListRequest<'a>
Source§fn clone(&self) -> SeriesListRequest<'a>
fn clone(&self) -> SeriesListRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SeriesListRequest<'a>
impl<'a> Debug for SeriesListRequest<'a>
Source§impl Paginate for SeriesListRequest<'_>
impl Paginate for SeriesListRequest<'_>
Source§const MAX_PAGE: u32 = 1000
const MAX_PAGE: u32 = 1000
FRED’s maximum page size for this endpoint — the largest
limit it
honors. 1000 for most lists; 10000 for release dates and vintage dates.Source§type Page = SeriesSearchResults
type Page = SeriesSearchResults
The page type this request returns.
Source§fn requested_limit(&self) -> Option<u32>
fn requested_limit(&self) -> Option<u32>
The caller’s requested
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>
The caller’s requested
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
Return a copy of this request with
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 a single page — equivalent to the builder’s own
send.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SeriesListRequest<'a>
impl<'a> !UnwindSafe for SeriesListRequest<'a>
impl<'a> Freeze for SeriesListRequest<'a>
impl<'a> Send for SeriesListRequest<'a>
impl<'a> Sync for SeriesListRequest<'a>
impl<'a> Unpin for SeriesListRequest<'a>
impl<'a> UnsafeUnpin for SeriesListRequest<'a>
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