pub struct EffectiveLimit(/* private fields */);Expand description
A validated page size selected from a caller request and a policy.
Implementations§
Source§impl EffectiveLimit
impl EffectiveLimit
Sourcepub fn new(value: NonZeroU32) -> Self
pub fn new(value: NonZeroU32) -> Self
Creates an effective limit from a non-zero value.
Sourcepub fn as_usize(self) -> usize
pub fn as_usize(self) -> usize
Returns the page size as a usize for vector reservations and counters.
Sourcepub fn limit_plus_one(self) -> usize
pub fn limit_plus_one(self) -> usize
Returns the number of items an engine should try to read to detect a next page.
Trait Implementations§
Source§impl Clone for EffectiveLimit
impl Clone for EffectiveLimit
Source§fn clone(&self) -> EffectiveLimit
fn clone(&self) -> EffectiveLimit
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 EffectiveLimit
Source§impl Debug for EffectiveLimit
impl Debug for EffectiveLimit
impl Eq for EffectiveLimit
Source§impl Ord for EffectiveLimit
impl Ord for EffectiveLimit
Source§fn cmp(&self, other: &EffectiveLimit) -> Ordering
fn cmp(&self, other: &EffectiveLimit) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EffectiveLimit
impl PartialEq for EffectiveLimit
Source§impl PartialOrd for EffectiveLimit
impl PartialOrd for EffectiveLimit
impl StructuralPartialEq for EffectiveLimit
Auto Trait Implementations§
impl Freeze for EffectiveLimit
impl RefUnwindSafe for EffectiveLimit
impl Send for EffectiveLimit
impl Sync for EffectiveLimit
impl Unpin for EffectiveLimit
impl UnsafeUnpin for EffectiveLimit
impl UnwindSafe for EffectiveLimit
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