Struct scryfall::util::uri::PaginatedURI[][src]

pub struct PaginatedURI<T> { /* fields omitted */ }

A paginating URL fetcher.

Sometimes the data pointed to by a URL is paginated. In that case a PaginatedURI is needed to iterate over the pages of data.

When iterating over one, every call to next returns a either a vector of T or an error. If an Err is returned then subsequent calls to next() will return None, since the error is likely to repeat after that point.

Implementations

impl<T: DeserializeOwned> PaginatedURI<T>[src]

pub fn new(url: URI<T>) -> Self[src]

Creates a new PaginatedURI iterator from a URI of type T.

Trait Implementations

impl<T: Clone> Clone for PaginatedURI<T>[src]

impl<T: Debug> Debug for PaginatedURI<T>[src]

impl<'de, T> Deserialize<'de> for PaginatedURI<T> where
    T: Deserialize<'de>, 
[src]

impl<T: Eq> Eq for PaginatedURI<T>[src]

impl<T: Hash> Hash for PaginatedURI<T>[src]

impl<T: DeserializeOwned> Iterator for PaginatedURI<T>[src]

type Item = Result<Vec<T>>

The type of the elements being iterated over.

impl<T: Ord> Ord for PaginatedURI<T>[src]

impl<T: PartialEq> PartialEq<PaginatedURI<T>> for PaginatedURI<T>[src]

impl<T: PartialOrd> PartialOrd<PaginatedURI<T>> for PaginatedURI<T>[src]

impl<T> Serialize for PaginatedURI<T> where
    T: Serialize
[src]

impl<T> StructuralEq for PaginatedURI<T>[src]

impl<T> StructuralPartialEq for PaginatedURI<T>[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.