pub struct SizeBounds(/* private fields */);Expand description
The minimum and maximum bounds on the size of a collection.
The interval must form a subset of [0, std::usize::MAX).
Implementations§
Source§impl SizeBounds
impl SizeBounds
Sourcepub fn with<X>(self, and: X) -> HCons<Self, HCons<X, HNil>>
pub fn with<X>(self, and: X) -> HCons<Self, HCons<X, HNil>>
Merges self together with some other argument producing a product
type expected by some impelementations of A: Arbitrary<'a> in
A::Parameters. This can be more ergonomic to work with and may
help type inference.
Sourcepub fn lift<X: Default>(self) -> HCons<Self, HCons<X, HNil>>
pub fn lift<X: Default>(self) -> HCons<Self, HCons<X, HNil>>
Merges self together with some other argument generated with a
default value producing a product type expected by some
impelementations of A: Arbitrary<'a> in A::Parameters.
This can be more ergonomic to work with and may help type inference.
Trait Implementations§
Source§impl Add<usize> for SizeBounds
Adds usize to both start and end of the bounds.
impl Add<usize> for SizeBounds
Adds usize to both start and end of the bounds.
Source§impl<'a> Arbitrary<'a> for SizeBounds
impl<'a> Arbitrary<'a> for SizeBounds
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = Map<<Range<usize> as Arbitrary<'a>>::Strategy, FromMapper<<<<Range<usize> as Arbitrary<'a>>::Strategy as Strategy>::Value as ValueTree>::Value, SizeBounds>>
type Strategy = Map<<Range<usize> as Arbitrary<'a>>::Strategy, FromMapper<<<<Range<usize> as Arbitrary<'a>>::Strategy as Strategy>::Value as ValueTree>::Value, SizeBounds>>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
Source§impl Clone for SizeBounds
impl Clone for SizeBounds
Source§fn clone(&self) -> SizeBounds
fn clone(&self) -> SizeBounds
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SizeBounds
impl Debug for SizeBounds
Source§impl Default for SizeBounds
impl Default for SizeBounds
Source§impl From<(usize, usize)> for SizeBounds
Given (low: usize, high: usize), then a range [low..high) is the result.
impl From<(usize, usize)> for SizeBounds
Given (low: usize, high: usize), then a range [low..high) is the result.
Source§impl From<usize> for SizeBounds
Given exact, then a range [exact..exact + 1) is the result.
impl From<usize> for SizeBounds
Given exact, then a range [exact..exact + 1) is the result.
Source§impl Generic for SizeBounds
impl Generic for SizeBounds
Source§impl Hash for SizeBounds
impl Hash for SizeBounds
Source§impl PartialEq for SizeBounds
impl PartialEq for SizeBounds
impl Eq for SizeBounds
impl StructuralPartialEq for SizeBounds
Auto Trait Implementations§
impl Freeze for SizeBounds
impl RefUnwindSafe for SizeBounds
impl Send for SizeBounds
impl Sync for SizeBounds
impl Unpin for SizeBounds
impl UnwindSafe for SizeBounds
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