Struct ghrs::Page[][src]

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

A page which enables to get prev/next pages.

Implementations

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

pub fn from_response(response: Response) -> Result<Page<T>, Error>[src]

Create a Page from response.

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

pub fn get_next_page(&self) -> Option<Page<T>>[src]

Returns a next page.

pub fn take_items(&mut self) -> Vec<T>[src]

Returns current items, and set an empty Vec instead.

pub fn get_prev(&self) -> Option<String>[src]

pub fn get_next(&self) -> Option<String>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

Trait Implementations

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

impl<T> IntoIterator for Page<T>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<T> RefUnwindSafe for Page<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Page<T> where
    T: Send
[src]

impl<T> Sync for Page<T> where
    T: Sync
[src]

impl<T> Unpin for Page<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Page<T> where
    T: UnwindSafe
[src]

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> From<T> for T[src]

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

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.