pub struct OffsetPageMetadata { /* private fields */ }Expand description
Validated metadata from one offset-based response.
Implementations§
Source§impl OffsetPageMetadata
impl OffsetPageMetadata
Sourcepub const fn new(
offset: u64,
page_size: u64,
next_offset: Option<u64>,
total_entries: Option<u64>,
) -> Result<Self, PaginationError>
pub const fn new( offset: u64, page_size: u64, next_offset: Option<u64>, total_entries: Option<u64>, ) -> Result<Self, PaginationError>
Creates offset metadata without inferring continuation.
Sourcepub const fn next_offset(self) -> Option<u64>
pub const fn next_offset(self) -> Option<u64>
Returns the next offset when advertised.
Sourcepub const fn total_entries(self) -> Option<u64>
pub const fn total_entries(self) -> Option<u64>
Returns total entries when known.
Trait Implementations§
Source§impl Clone for OffsetPageMetadata
impl Clone for OffsetPageMetadata
Source§fn clone(&self) -> OffsetPageMetadata
fn clone(&self) -> OffsetPageMetadata
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 moreimpl Copy for OffsetPageMetadata
Source§impl Debug for OffsetPageMetadata
impl Debug for OffsetPageMetadata
impl Eq for OffsetPageMetadata
Source§impl PartialEq for OffsetPageMetadata
impl PartialEq for OffsetPageMetadata
impl StructuralPartialEq for OffsetPageMetadata
Auto Trait Implementations§
impl Freeze for OffsetPageMetadata
impl RefUnwindSafe for OffsetPageMetadata
impl Send for OffsetPageMetadata
impl Sync for OffsetPageMetadata
impl Unpin for OffsetPageMetadata
impl UnsafeUnpin for OffsetPageMetadata
impl UnwindSafe for OffsetPageMetadata
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