pub struct Range<T> { /* private fields */ }Expand description
A strategy for generating values in a numeric range
Trait Implementations§
Source§impl Strategy for Range<f32>
impl Strategy for Range<f32>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<f64>
impl Strategy for Range<f64>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<i128>
impl Strategy for Range<i128>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<i16>
impl Strategy for Range<i16>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<i32>
impl Strategy for Range<i32>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<i64>
impl Strategy for Range<i64>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<i8>
impl Strategy for Range<i8>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<isize>
impl Strategy for Range<isize>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<u128>
impl Strategy for Range<u128>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<u16>
impl Strategy for Range<u16>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<u32>
impl Strategy for Range<u32>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<u64>
impl Strategy for Range<u64>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<u8>
impl Strategy for Range<u8>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Source§impl Strategy for Range<usize>
impl Strategy for Range<usize>
Source§fn generate<R: Rng>(
&self,
rng: &mut R,
_config: &GeneratorConfig,
) -> Self::Value
fn generate<R: Rng>( &self, rng: &mut R, _config: &GeneratorConfig, ) -> Self::Value
Generate a value using this strategy
Source§fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
fn shrink(&self, value: &Self::Value) -> Box<dyn Iterator<Item = Self::Value>>
Create an iterator of shrunk values from the given value
Source§fn map<F, U>(self, f: F) -> Map<Self, F>
fn map<F, U>(self, f: F) -> Map<Self, F>
Map this strategy to produce values of a different type
Auto Trait Implementations§
impl<T> Freeze for Range<T>where
T: Freeze,
impl<T> RefUnwindSafe for Range<T>where
T: RefUnwindSafe,
impl<T> Send for Range<T>where
T: Send,
impl<T> Sync for Range<T>where
T: Sync,
impl<T> Unpin for Range<T>where
T: Unpin,
impl<T> UnwindSafe for Range<T>where
T: UnwindSafe,
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