pub enum ResourceListPagination {
SinglePage {
page: u32,
may_have_more: bool,
},
AllPages {
pages_fetched: u32,
},
}Expand description
Pagination state for a resource list render call (D5 of the plan).
Models two mutually exclusive modes as an enum rather than two loose
Option<u32> fields that admit invalid combinations (e.g. both set).
The json renderer matches on this to build _meta pagination keys;
prose reads may_have_more (SinglePage only) for the “use –all” hint.
AllPages hard-codes may_have_more_results: false because the --all
loop only exits when the server reports false — the variant carries no
flag because it is guaranteed.
Variants§
SinglePage
A single page was fetched (default or --page N).
Fields
AllPages
All pages were fetched (--all).
Trait Implementations§
Source§impl Clone for ResourceListPagination
impl Clone for ResourceListPagination
Source§fn clone(&self) -> ResourceListPagination
fn clone(&self) -> ResourceListPagination
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResourceListPagination
impl RefUnwindSafe for ResourceListPagination
impl Send for ResourceListPagination
impl Sync for ResourceListPagination
impl Unpin for ResourceListPagination
impl UnsafeUnpin for ResourceListPagination
impl UnwindSafe for ResourceListPagination
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