Struct suppositions::generators::ResultGenerator
[−]
[src]
pub struct ResultGenerator<G, H>(_, _);
See result
Trait Implementations
impl<G: Debug, H: Debug> Debug for ResultGenerator<G, H>
[src]
impl<G: Clone, H: Clone> Clone for ResultGenerator<G, H>
[src]
fn clone(&self) -> ResultGenerator<G, H>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<G: Generator, H: Generator> Generator for ResultGenerator<G, H>
[src]
type Item = Result<G::Item, H::Item>
The type of values that we can generate.
fn generate<I: Iterator<Item = u8>>(&self, src: &mut I) -> Maybe<Self::Item>
[src]
This consumes a stream of bytes given by source
, and generates a value of type Self::Item
. Read more
fn generate_from(&self, src: &InfoPool) -> Maybe<Self::Item>
[src]
A convenience function to generate a value directly from an InfoPool
.
fn filter<F: Fn(&Self::Item) -> bool>(self, pred: F) -> Filtered<Self, F> where
Self: Sized,
[src]
Self: Sized,
Returns a generator that will skip values generated by self
when the predicate pred
returns false
. Read more
fn filter_map<R, F: Fn(Self::Item) -> Maybe<R>>(
self,
fun: F
) -> FilterMapped<Self, F> where
Self: Sized,
[src]
self,
fun: F
) -> FilterMapped<Self, F> where
Self: Sized,
A generator that takes the values generated by self
; then allows fun
to either Skip them (by returning Err(DataError::SkipItem)
or transform (by returning Ok(val)
). Read more
fn map<R, F: Fn(Self::Item) -> R>(self, fun: F) -> Mapped<Self, F> where
Self: Sized,
[src]
Self: Sized,
A generator that takes the generated values of self
and pipes them through fun
. Read more