Trait ArbitraryF1
trait ArbitraryF1<A: fmt::Debug>: fmt::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: TraitBound { trait_: Path { path: "Default", id: Id(34), args: None }, generic_params: [], modifier: None }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 as >::Parameters) -> BoxedStrategy<Self> where AS: Strategy<Value = A> + 'staticLifts 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> + 'staticLifts 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: ::core::fmt::Debug + 'static> ArbitraryF1 for core::ops::Bound<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for Mutex<A>impl<A: ::core::fmt::Debug + fmt::Debug + 'static + Iterator<Item = T>, B: 'static + Arbitrary + Iterator<Item = T>, T> ArbitraryF1 for Chain<B, A>impl<A: ::core::fmt::Debug + Ord> ArbitraryF1 for crate::std_facade::BinaryHeap<A>impl<A: ::core::fmt::Debug + PartialOrd> ArbitraryF1 for Range<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for core::cell::UnsafeCell<A>impl<A: ::core::fmt::Debug> ArbitraryF1 for Option<A>impl<A: ::core::fmt::Debug + 'static + Ord> ArbitraryF1 for btree_set::IntoIter<A>impl<A: ::core::fmt::Debug + Write> ArbitraryF1 for LineWriter<A>impl<A: ::core::fmt::Debug + 'static + Iterator> ArbitraryF1 for Enumerate<A>impl<A: ::core::fmt::Debug + Borrow<B> + 'static, B: ToOwned<Owned = A> + fmt::Debug + ?Sized> ArbitraryF1 for crate::std_facade::Cow<'static, B>impl<A: ::core::fmt::Debug, K: Ord + Arbitrary + 'static> ArbitraryF1 for crate::std_facade::BTreeMap<K, A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for std::panic::AssertUnwindSafe<A>impl<A: ::core::fmt::Debug + fmt::Debug + 'static + Iterator, B: 'static + Arbitrary + Iterator> ArbitraryF1 for Zip<B, A>impl<A: ::core::fmt::Debug + Ord> ArbitraryF1 for crate::std_facade::BTreeSet<A>impl<A: ::core::fmt::Debug + PartialOrd> ArbitraryF1 for RangeInclusive<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for core::cell::RefCell<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for Wrapping<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for linked_list::IntoIter<A>impl<A: ::core::fmt::Debug + Write> ArbitraryF1 for BufWriter<A>impl<A: ::core::fmt::Debug + 'static + Iterator + Clone> ArbitraryF1 for Cycle<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for core::result::IntoIter<A>impl<A: ::core::fmt::Debug + 'static, K: Hash + Eq + Arbitrary + 'static> ArbitraryF1 for hash_map::IntoIter<K, A>impl<A: ::core::fmt::Debug + 'static + Read> ArbitraryF1 for Take<A>impl<T: 'static + Clone, A: fmt::Debug + 'static + Iterator<Item = &'static T>> ArbitraryF1 for Cloned<A>impl<A: ::core::fmt::Debug> ArbitraryF1 for crate::std_facade::LinkedList<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for RangeToInclusive<A>impl<A: ::core::fmt::Debug + 'static + Copy> ArbitraryF1 for core::cell::Cell<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for Discriminant<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for vec_deque::IntoIter<A>impl<A: ::core::fmt::Debug + Read> ArbitraryF1 for BufReader<A>impl<A: ::core::fmt::Debug + 'static + Clone> ArbitraryF1 for Repeat<A>impl<A: fmt::Debug, E: Arbitrary> ArbitraryF1 for Result<A, E>impl<A: ::core::fmt::Debug, K: Hash + Eq + Arbitrary + 'static> ArbitraryF1 for crate::std_facade::HashMap<K, A>impl<A: ::core::fmt::Debug + 'static + BufRead> ArbitraryF1 for Split<A>impl<A: ::core::fmt::Debug + 'static + DoubleEndedIterator> ArbitraryF1 for Rev<A>impl<A: ::core::fmt::Debug> ArbitraryF1 for crate::std_facade::VecDeque<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for RangeTo<A>impl<A: ::core::fmt::Debug + Iterator> ArbitraryF1 for Take<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for vec::IntoIter<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for crate::std_facade::Arc<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for Once<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for Result<A, string::ParseError>impl<A: ::core::fmt::Debug + 'static + Hash + Eq> ArbitraryF1 for hash_set::IntoIter<A>impl<A: ::core::fmt::Debug + 'static + BufRead> ArbitraryF1 for Lines<A>impl<A: ::core::fmt::Debug + 'static + Iterator<Item = T>, T: fmt::Debug> ArbitraryF1 for Peekable<A>impl<A: ::core::fmt::Debug> ArbitraryF1 for crate::std_facade::Vec<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for RangeFrom<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for RwLock<A>impl<A: ::core::fmt::Debug + Iterator> ArbitraryF1 for Skip<A>impl<A: ::core::fmt::Debug + Hash + Eq> ArbitraryF1 for crate::std_facade::HashSet<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for crate::std_facade::Rc<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for core::cmp::Reverse<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for opt::IntoIter<A>impl<A: ::core::fmt::Debug + 'static + Ord> ArbitraryF1 for binary_heap::IntoIter<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for Cursor<A>impl<A: ::core::fmt::Debug + 'static + Iterator> ArbitraryF1 for core::iter::Fuse<A>impl<A: ::core::fmt::Debug + 'static> ArbitraryF1 for crate::std_facade::Box<A>