Skip to main content

Page

Struct Page 

Source
pub struct Page<K> {
    pub after: Option<K>,
    pub limit: usize,
    pub bytes: usize,
}
Expand description

Which rows of a listing to visit: those after the row whose key is after, in the listing’s key order, at most limit of them, and no more once their text reaches bytes. A listing reads a page with one query that starts at after in the table’s primary key, so a caller can walk a table a page at a time, holding one page, and resume from the last key it saw.

Fields§

§after: Option<K>

The key of the last row already seen, or None to start at the first row.

§limit: usize

The most rows to visit.

§bytes: usize

The text to visit: the page stops after the row that brings the bytes of its rows’ keys and documents to this, so it always visits a row when there is one, and holds less than this and one row.

Implementations§

Source§

impl<K> Page<K>

Source

pub const fn all() -> Self

Every row, from the first.

Trait Implementations§

Source§

impl<K: Clone> Clone for Page<K>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: Copy> Copy for Page<K>

Source§

impl<K: Debug> Debug for Page<K>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K: Eq> Eq for Page<K>

Source§

impl<K: PartialEq> PartialEq for Page<K>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<K: PartialEq> StructuralPartialEq for Page<K>

Auto Trait Implementations§

§

impl<K> Forget for Page<K>

§

impl<K> Freeze for Page<K>
where Option<K>: Freeze,

§

impl<K> Move for Page<K>

§

impl<K> RefUnwindSafe for Page<K>

§

impl<K> Send for Page<K>
where Option<K>: Send,

§

impl<K> Sync for Page<K>
where Option<K>: Sync,

§

impl<K> Unpin for Page<K>
where Option<K>: Unpin,

§

impl<K> UnsafeUnpin for Page<K>
where Option<K>: UnsafeUnpin,

§

impl<K> UnwindSafe for Page<K>
where Option<K>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.