Struct Flatten
#[must_use = "strategies do nothing unless used"]
pub struct Flatten<S> { /* private fields */ }
Adaptor that flattens a Strategy which produces other Strategys into a
Strategy that picks one of those strategies and then picks values from
it.
Implementations
impl<S: Strategy> Flatten<S>
fn new(source: S) -> SelfWrap
sourceto flatten it.
Trait Implementations
impl<S: Clone> Clone for Flatten<S>
fn clone(&self) -> Flatten<S>
impl<S: Copy> Copy for Flatten<S>
impl<S: Debug> Debug for Flatten<S>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S: Strategy> Strategy for Flatten<S>
where
S::Value: Strategy,
type Tree = FlattenValueTree<<S as Strategy>::Tree>;type Value = <<S as Strategy>::Value as Strategy>::Value;fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
Auto Trait Implementations
impl<S> Freeze for Flatten<S>
where
S: Freeze,
impl<S> RefUnwindSafe for Flatten<S>
where
S: RefUnwindSafe,
impl<S> Send for Flatten<S>
where
S: Send,
impl<S> Sync for Flatten<S>
where
S: Sync,
impl<S> Unpin for Flatten<S>
where
S: Unpin,
impl<S> UnsafeUnpin for Flatten<S>
where
S: UnsafeUnpin,
impl<S> UnwindSafe for Flatten<S>
where
S: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Flatten<S>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Flatten<S>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for Flatten<S>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Flatten<S>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Flatten<S>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Flatten<S>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Flatten<S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Read<Exclusive, BecauseExclusive> for Flatten<S>
where
T: ?Sized,
impl<T> ToOwned for Flatten<S>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Flatten<S>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Flatten<S>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Flatten<S>
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 Flatten<S>
where
V: MultiLane<T>,
fn vzip(self) -> V