pub struct Page<A> {
pub resources: Vec<Resource<A>>,
pub next: Option<String>,
pub last: Option<String>,
}Expand description
A decoded page: the items plus the links needed to fetch more.
Fields§
§resources: Vec<Resource<A>>The page’s resources.
next: Option<String>URL of the next page, if any.
last: Option<String>URL of the last page, if any.
Implementations§
Source§impl<A> Page<A>
impl<A> Page<A>
Sourcepub fn from_doc(doc: CollectionDoc<A>) -> Self
pub fn from_doc(doc: CollectionDoc<A>) -> Self
Build a page from a decoded collection document.
Sourcepub fn into_items(self) -> Vec<A>
pub fn into_items(self) -> Vec<A>
Consume the page into the bare item list.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Page<A>
impl<A> RefUnwindSafe for Page<A>
impl<A> Send for Page<A>
impl<A> Sync for Page<A>
impl<A> Unpin for Page<A>
impl<A> UnsafeUnpin for Page<A>
impl<A> UnwindSafe for Page<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