Struct SBoxedStrategy

#[must_use = "strategies do nothing unless used"]
pub struct SBoxedStrategy<T>(/* private field */);

A boxed Strategy trait object which is also Sync and Send, as produced by Strategy::sboxed().

Strategies of this type afford cheap shallow cloning via reference counting by using an Arc internally.

Trait Implementations

impl<T> Clone for SBoxedStrategy<T>

fn clone(&self) -> Self

impl<T: Debug> Debug for SBoxedStrategy<T>

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

impl<T: Debug> Strategy for SBoxedStrategy<T>

type Tree = Box<dyn ValueTree<Value = T>>;
type Value = T;
fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
fn sboxed(self) -> SBoxedStrategy<Self::Value>
where
    Self: Sized + Send + Sync + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>
where
    Self: Sized + 'static,

Auto Trait Implementations

impl<T> !RefUnwindSafe for SBoxedStrategy<T>

impl<T> !UnwindSafe for SBoxedStrategy<T>

impl<T> Freeze for SBoxedStrategy<T> where Arc<dyn Strategy<Tree = Box<dyn ValueTree<Value = T>>, Value = T> + Sync + Send>: Freeze,

impl<T> Send for SBoxedStrategy<T> where Arc<dyn Strategy<Tree = Box<dyn ValueTree<Value = T>>, Value = T> + Sync + Send>: Send,

impl<T> Sync for SBoxedStrategy<T> where Arc<dyn Strategy<Tree = Box<dyn ValueTree<Value = T>>, Value = T> + Sync + Send>: Sync,

impl<T> Unpin for SBoxedStrategy<T> where Arc<dyn Strategy<Tree = Box<dyn ValueTree<Value = T>>, Value = T> + Sync + Send>: Unpin,

impl<T> UnsafeUnpin for SBoxedStrategy<T> where Arc<dyn Strategy<Tree = Box<dyn ValueTree<Value = T>>, Value = T> + Sync + Send>: UnsafeUnpin,

Blanket Implementations

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

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

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

impl<T> CloneToUninit for SBoxedStrategy<T> where T: Clone,

impl<T> From<T> for SBoxedStrategy<T>

impl<T> ToOwned for SBoxedStrategy<T> where T: Clone,

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

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

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