#[non_exhaustive]pub struct PageFollowLimits {
pub max_pages: u32,
pub max_items: u64,
}Expand description
Limits for automatic page following.
Experimental: may change in a 0.x minor release.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_pages: u32Maximum number of HTTP list pages to fetch (including the first).
max_items: u64Stop after the page on which the running item count reaches this value.
That page is yielded whole, so the total can exceed this by up to one
page (each page is still bounded by crate::Limits::max_json_bytes).
Implementations§
Source§impl PageFollowLimits
impl PageFollowLimits
Sourcepub fn new(max_pages: u32, max_items: u64) -> Self
pub fn new(max_pages: u32, max_items: u64) -> Self
Limits with an explicit page and item bound.
Sourcepub fn with_max_pages(self, max_pages: u32) -> Self
pub fn with_max_pages(self, max_pages: u32) -> Self
Set Self::max_pages.
Sourcepub fn with_max_items(self, max_items: u64) -> Self
pub fn with_max_items(self, max_items: u64) -> Self
Set Self::max_items.
Trait Implementations§
Source§impl Clone for PageFollowLimits
impl Clone for PageFollowLimits
impl Copy for PageFollowLimits
Source§impl Debug for PageFollowLimits
impl Debug for PageFollowLimits
Source§impl Default for PageFollowLimits
impl Default for PageFollowLimits
impl Eq for PageFollowLimits
Source§impl PartialEq for PageFollowLimits
impl PartialEq for PageFollowLimits
impl StructuralPartialEq for PageFollowLimits
Auto Trait Implementations§
impl Forget for PageFollowLimits
impl Freeze for PageFollowLimits
impl Move for PageFollowLimits
impl RefUnwindSafe for PageFollowLimits
impl Send for PageFollowLimits
impl Sync for PageFollowLimits
impl Unpin for PageFollowLimits
impl UnsafeUnpin for PageFollowLimits
impl UnwindSafe for PageFollowLimits
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