Struct RangeSubset

pub struct RangeSubset<T> { /* private fields */ }

Strategy to generate Vecs by sampling a subset from an index range.

This is created by the range_subset function in the same module.

Trait Implementations

impl<T> Strategy for RangeSubset<T> where T: Copy + Eq + Hash + Debug, Range<T>: ExactSizeIterator<Item = T>,

type Tree = RangeSubsetValueTree<T>;
type Value = Vec<T>;
fn new_tree(&self, runner: &mut TestRunner) -> Result<Self::Tree, Reason>

impl<T: Debug> Debug for RangeSubset<T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<T> Freeze for RangeSubset<T> where Range<T>: Freeze,

impl<T> RefUnwindSafe for RangeSubset<T> where Range<T>: RefUnwindSafe,

impl<T> Send for RangeSubset<T> where Range<T>: Send,

impl<T> Sync for RangeSubset<T> where Range<T>: Sync,

impl<T> Unpin for RangeSubset<T> where Range<T>: Unpin,

impl<T> UnsafeUnpin for RangeSubset<T> where Range<T>: UnsafeUnpin,

impl<T> UnwindSafe for RangeSubset<T> where Range<T>: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for RangeSubset<T> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for RangeSubset<T> where ST: ?Sized, DT: ?Sized,

impl<T> Any for RangeSubset<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for RangeSubset<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for RangeSubset<T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for RangeSubset<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Read<Exclusive, BecauseExclusive> for RangeSubset<T> where T: ?Sized,

impl<T, U> Into<U> for RangeSubset<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for RangeSubset<T> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for RangeSubset<T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for RangeSubset<T> where V: MultiLane<T>,

fn vzip(self) -> V