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>,
source§impl<T: PartialEq> PartialEq for List<T>
impl<T: PartialEq> PartialEq for List<T>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.