Struct OptionStrategy
#[must_use = "strategies do nothing unless used"]
pub struct OptionStrategy<T>(/* private field */)
where
T: Strategy,;
Strategy which generates Option values whose inner Some values are
generated by another strategy.
Constructed by other functions in this module.
Trait Implementations
impl<T> Clone for OptionStrategy<T>
where
T: Strategy + Clone,
T::Value: Clone,
fn clone(&self) -> OptionStrategy<T>
impl<T> Strategy for OptionStrategy<T>
where
T: Strategy,
type Tree = OptionValueTree<T>;type Value = Option<<T as Strategy>::Value>;fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
impl<T: Strategy + Debug> Debug for OptionStrategy<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<T> Freeze for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: Freeze,
impl<T> RefUnwindSafe for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: RefUnwindSafe,
impl<T> Send for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: Send,
impl<T> Sync for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: Sync,
impl<T> Unpin for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: Unpin,
impl<T> UnsafeUnpin for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: UnsafeUnpin,
impl<T> UnwindSafe for OptionStrategy<T>
where
TupleUnion<((u32, Arc<NoneStrategy<<T as Strategy>::Value>>), (u32, Arc<Map<T, WrapSome>>))>: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for OptionStrategy<T>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for OptionStrategy<T>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for OptionStrategy<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for OptionStrategy<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for OptionStrategy<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for OptionStrategy<T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for OptionStrategy<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Read<Exclusive, BecauseExclusive> for OptionStrategy<T>
where
T: ?Sized,
impl<T> ToOwned for OptionStrategy<T>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for OptionStrategy<T>
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 OptionStrategy<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for OptionStrategy<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 OptionStrategy<T>
where
V: MultiLane<T>,
fn vzip(self) -> V