pub struct PaginationConfigBuilder { /* private fields */ }Expand description
Builder for PaginationConfig.
Implementations§
Source§impl PaginationConfigBuilder
impl PaginationConfigBuilder
Sourcepub fn max_page_size(&mut self, value: u32) -> &mut Self
pub fn max_page_size(&mut self, value: u32) -> &mut Self
The maximum elements a page can contain.
Shall be less than u32::MAX - 1.
Default to ‘30’ if not set.
Sourcepub fn default_page_size(&mut self, value: u32) -> &mut Self
pub fn default_page_size(&mut self, value: u32) -> &mut Self
The default number of elements in a page.
Shall be less or equal than max_page_size.
Default to ‘10’ if not set.
Sourcepub fn build(&self) -> Result<PaginationConfig, PaginationConfigBuilderError>
pub fn build(&self) -> Result<PaginationConfig, PaginationConfigBuilderError>
Trait Implementations§
Source§impl Clone for PaginationConfigBuilder
impl Clone for PaginationConfigBuilder
Source§fn clone(&self) -> PaginationConfigBuilder
fn clone(&self) -> PaginationConfigBuilder
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 PaginationConfigBuilder
impl RefUnwindSafe for PaginationConfigBuilder
impl Send for PaginationConfigBuilder
impl Sync for PaginationConfigBuilder
impl Unpin for PaginationConfigBuilder
impl UnsafeUnpin for PaginationConfigBuilder
impl UnwindSafe for PaginationConfigBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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