Trait ArbitraryF1
pub trait ArbitraryF1<A: Debug>: Debug + Sized
ArbitraryF1 lets you lift a Strategy to unary
type constructors such as Box, Vec, and Option.
The trait corresponds to
Haskell QuickCheck's Arbitrary1 type class.
Associated Types
type Parameters: Default;The type of parameters that
lift1_withaccepts for configuration of the lifted and generatedStrategy. Parameters must implementDefault.
Required Methods
fn lift1_with<AS>(base: AS, args: Self::Parameters) -> BoxedStrategy<Self> where AS: Strategy<Value = A> + 'static,Lifts a given
Strategyto a newStrategyfor the (presumably) bigger type. This is useful for lifting aStrategyforSomeTypeto a container such asVecofSomeType. The composite strategy is passed the arguments given inargs.If you wish to use the
default()arguments, uselift1instead.
Provided Methods
fn lift1<AS>(base: AS) -> BoxedStrategy<Self> where AS: Strategy<Value = A> + 'static,Lifts a given
Strategyto a newStrategyfor the (presumably) bigger type. This is useful for lifting aStrategyforSomeTypeto a container such asVec<SomeType>.Calling this for the type
Xis the equivalent of usingX::lift1_with(base, Default::default()).This method is defined in the trait for optimization for the default if you want to do that. It is a logic error to not preserve the semantics when overriding.
Implementors
impl<A: Debug + 'static + BufRead> ArbitraryF1<A> for Lines<A>impl<A: Debug + 'static + BufRead> ArbitraryF1<A> for Split<A>impl<A: Debug + 'static + Clone> ArbitraryF1<A> for Repeat<A>impl<A: Debug + 'static + Copy> ArbitraryF1<A> for Cell<A>impl<A: Debug + 'static + DoubleEndedIterator> ArbitraryF1<A> for Rev<A>impl<A: Debug + 'static + Hash + Eq> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static + Iterator + Clone> ArbitraryF1<A> for Cycle<A>impl<A: Debug + 'static + Iterator> ArbitraryF1<A> for Enumerate<A>impl<A: Debug + 'static + Iterator> ArbitraryF1<A> for Fuse<A>impl<A: Debug + 'static + Iterator<Item = T>, T: Debug> ArbitraryF1<A> for Peekable<A>impl<A: Debug + 'static + Ord> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static + Ord> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static + Read> ArbitraryF1<A> for Take<A>impl<A: Debug + 'static> ArbitraryF1<A> for Arc<A>impl<A: Debug + 'static> ArbitraryF1<A> for AssertUnwindSafe<A>impl<A: Debug + 'static> ArbitraryF1<A> for Bound<A>impl<A: Debug + 'static> ArbitraryF1<A> for Box<A>impl<A: Debug + 'static> ArbitraryF1<A> for Cursor<A>impl<A: Debug + 'static> ArbitraryF1<A> for Discriminant<A>impl<A: Debug + 'static> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static> ArbitraryF1<A> for IntoIter<A>impl<A: Debug + 'static> ArbitraryF1<A> for Mutex<A>impl<A: Debug + 'static> ArbitraryF1<A> for Once<A>impl<A: Debug + 'static> ArbitraryF1<A> for RangeFrom<A>impl<A: Debug + 'static> ArbitraryF1<A> for RangeTo<A>impl<A: Debug + 'static> ArbitraryF1<A> for RangeToInclusive<A>impl<A: Debug + 'static> ArbitraryF1<A> for Rc<A>impl<A: Debug + 'static> ArbitraryF1<A> for RefCell<A>impl<A: Debug + 'static> ArbitraryF1<A> for Result<A, ParseError>impl<A: Debug + 'static> ArbitraryF1<A> for Reverse<A>impl<A: Debug + 'static> ArbitraryF1<A> for RwLock<A>impl<A: Debug + 'static> ArbitraryF1<A> for Saturating<A>impl<A: Debug + 'static> ArbitraryF1<A> for UnsafeCell<A>impl<A: Debug + 'static> ArbitraryF1<A> for Wrapping<A>impl<A: Debug + 'static, K: Hash + Eq + Arbitrary + 'static> ArbitraryF1<A> for IntoIter<K, A>impl<A: Debug + Borrow<B> + 'static, B: ToOwned<Owned = A> + Debug + ?Sized> ArbitraryF1<A> for Cow<'static, B>impl<A: Debug + Debug + 'static + Iterator<Item = T>, B: 'static + Arbitrary + Iterator<Item = T>, T> ArbitraryF1<A> for Chain<B, A>impl<A: Debug + Debug + 'static + Iterator, B: 'static + Arbitrary + Iterator> ArbitraryF1<A> for Zip<B, A>impl<A: Debug + Hash + Eq> ArbitraryF1<A> for HashSet<A>impl<A: Debug + Iterator> ArbitraryF1<A> for Skip<A>impl<A: Debug + Iterator> ArbitraryF1<A> for Take<A>impl<A: Debug + Ord> ArbitraryF1<A> for BTreeSet<A>impl<A: Debug + Ord> ArbitraryF1<A> for BinaryHeap<A>impl<A: Debug + PartialOrd> ArbitraryF1<A> for Range<A>impl<A: Debug + PartialOrd> ArbitraryF1<A> for RangeInclusive<A>impl<A: Debug + Read> ArbitraryF1<A> for BufReader<A>impl<A: Debug + Write> ArbitraryF1<A> for BufWriter<A>impl<A: Debug + Write> ArbitraryF1<A> for LineWriter<A>impl<A: Debug> ArbitraryF1<A> for LinkedList<A>impl<A: Debug> ArbitraryF1<A> for Option<A>impl<A: Debug> ArbitraryF1<A> for Vec<A>impl<A: Debug> ArbitraryF1<A> for VecDeque<A>impl<A: Debug, E: Arbitrary> ArbitraryF1<A> for Result<A, E> where E::Strategy: 'static,impl<A: Debug, K: Hash + Eq + Arbitrary + 'static> ArbitraryF1<A> for HashMap<K, A>impl<A: Debug, K: Ord + Arbitrary + 'static> ArbitraryF1<A> for BTreeMap<K, A>impl<T: 'static + Clone, A: Debug + 'static + Iterator<Item = &'static T>> ArbitraryF1<A> for Cloned<A>