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) -> Self

Wrap source to flatten it.

Trait Implementations

impl<S: Clone> Clone for Flatten<S>

fn clone(&self) -> Self

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<T> Any for Flatten<S> where T: 'static + ?Sized,

impl<T> Borrow<T> for Flatten<S> where T: ?Sized,

impl<T> BorrowMut<T> for Flatten<S> where T: ?Sized,

impl<T> CloneToUninit for Flatten<S> where T: Clone,

impl<T> From<T> for Flatten<S>

impl<T> ToOwned for Flatten<S> where T: Clone,

impl<T, U> Into<U> for Flatten<S> where U: From<T>,

impl<T, U> TryFrom<U> for Flatten<S> where U: Into<T>,

impl<T, U> TryInto<U> for Flatten<S> where U: TryFrom<T>,