pub struct List<T> {
pub data: Vec<T>,
pub has_more: bool,
pub next_page: Option<Uri<List<T>>>,
pub total_cards: Option<usize>,
pub warnings: Option<Vec<String>>,
}
Expand description
A List object represents a requested sequence of other objects (Cards, Sets, etc). List objects may be paginated, and also include information about issues raised when generating the list.
For more information, visit the official docs.
Fields§
§data: Vec<T>
An array of the requested objects, in a specific order.
has_more: bool
True if this List is paginated and there is a page beyond the current page.
next_page: Option<Uri<List<T>>>
If there is a page beyond the current page, this field will contain a full API URI to that page. You may submit a HTTP GET request to that URI to continue paginating forward on this List.
total_cards: Option<usize>
If this is a list of Card objects, this field will contain the total number of cards found across all pages.
warnings: Option<Vec<String>>
An array of human-readable warnings issued when generating this list, as strings. Warnings are non-fatal issues that the API discovered with your input. In general, they indicate that the List will not contain the all of the information you requested. You should fix the warnings and re-submit your request.
Implementations§
Source§impl<T: DeserializeOwned + Send + Sync + Unpin> List<T>
impl<T: DeserializeOwned + Send + Sync + Unpin> List<T>
Sourcepub fn into_page_iter(self) -> PageIter<T>
pub fn into_page_iter(self) -> PageIter<T>
Creates an iterator over all the pages of this list.
Sourcepub fn into_list_iter(self) -> ListIter<T>
pub fn into_list_iter(self) -> ListIter<T>
Creates a ListIter from a List
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for List<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for List<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl<T: Eq> Eq for List<T>
impl<T> StructuralPartialEq for List<T>
Auto Trait Implementations§
impl<T> Freeze for List<T>
impl<T> RefUnwindSafe for List<T>where
T: RefUnwindSafe,
impl<T> Send for List<T>where
T: Send,
impl<T> Sync for List<T>where
T: Sync,
impl<T> Unpin for List<T>where
T: Unpin,
impl<T> UnwindSafe for List<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more