Struct EntityLoaderPaginator
pub struct EntityLoaderPaginator<'db, C, E, L>{ /* private fields */ }Implementations§
§impl<'db, C, E, L> EntityLoaderPaginator<'db, C, E, L>
impl<'db, C, E, L> EntityLoaderPaginator<'db, C, E, L>
pub async fn fetch_page(&self, page: u64) -> Result<Vec<L::ModelEx>, DbErr>
pub async fn fetch_page(&self, page: u64) -> Result<Vec<L::ModelEx>, DbErr>
Fetch a specific page; page index starts from zero
pub async fn num_items_and_pages(&self) -> Result<ItemsAndPagesNumber, DbErr>
pub async fn num_items_and_pages(&self) -> Result<ItemsAndPagesNumber, DbErr>
Get the total number of items and pages
pub fn next(&mut self)
pub fn next(&mut self)
Increment the page counter
Trait Implementations§
§impl<'db, C, E, L> Debug for EntityLoaderPaginator<'db, C, E, L>
impl<'db, C, E, L> Debug for EntityLoaderPaginator<'db, C, E, L>
Auto Trait Implementations§
impl<'db, C, E, L> Freeze for EntityLoaderPaginator<'db, C, E, L>where
L: Freeze,
impl<'db, C, E, L> RefUnwindSafe for EntityLoaderPaginator<'db, C, E, L>
impl<'db, C, E, L> Send for EntityLoaderPaginator<'db, C, E, L>where
L: Send,
impl<'db, C, E, L> Sync for EntityLoaderPaginator<'db, C, E, L>where
L: Sync,
impl<'db, C, E, L> Unpin for EntityLoaderPaginator<'db, C, E, L>
impl<'db, C, E, L> UnwindSafe for EntityLoaderPaginator<'db, C, E, L>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more