Struct Filter

struct Filter<S, F> { ... }

Static version of strategy::Filter.

Implementations

impl<S, F> Filter<S, F>

fn new(source: S, whence: Reason, filter: F) -> Self

Adapt strategy source to reject values which do not pass filter, using whence as the reported reason/location.

impl<S, F> Freeze for Filter<S, F>

impl<S, F> RefUnwindSafe for Filter<S, F>

impl<S, F> Send for Filter<S, F>

impl<S, F> Sync for Filter<S, F>

impl<S, F> Unpin for Filter<S, F>

impl<S, F> UnwindSafe for Filter<S, F>

impl<S: $crate::clone::Clone, F: $crate::clone::Clone> Clone for Filter<S, F>

fn clone(self: &Self) -> Filter<S, F>

impl<S: Strategy, F: FilterFn<<S as >::Value> + Clone> Strategy for Filter<S, F>

fn new_tree(self: &Self, runner: &mut TestRunner) -> NewTree<Self>

impl<S: ValueTree, F: FilterFn<<S as >::Value>> ValueTree for Filter<S, F>

fn current(self: &Self) -> <S as >::Value
fn simplify(self: &mut Self) -> bool
fn complicate(self: &mut Self) -> bool

impl<S: fmt::Debug, F> Debug for Filter<S, F>

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

impl<T> Any for Filter<S, F>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Filter<S, F>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Filter<S, F>

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

impl<T> CloneToUninit for Filter<S, F>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Filter<S, F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Filter<S, F>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Filter<S, F>

fn into(self: 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 for Filter<S, F>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Filter<S, F>

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

impl<V, T> VZip for Filter<S, F>

fn vzip(self: Self) -> V