Trait dataflow::operator::CollectionExt [−][src]
pub trait CollectionExt<G, D1, R> where
G: Scope,
R: Semigroup, {
fn empty(scope: &G) -> Collection<G, D1, R>;
fn flat_map_fallible<D2, E, I, L>(
&self,
name: &str,
logic: L
) -> (Collection<G, D2, R>, Collection<G, E, R>)
where
D2: Data,
E: Data,
I: IntoIterator<Item = Result<D2, E>>,
L: FnMut(D1) -> I + 'static;
fn map_fallible<D2, E, L>(
&self,
name: &str,
logic: L
) -> (Collection<G, D2, R>, Collection<G, E, R>)
where
D2: Data,
E: Data,
L: FnMut(D1) -> Result<D2, E> + 'static,
{ ... }
}
Expand description
Extension methods for differential Collection
s.
Required methods
fn empty(scope: &G) -> Collection<G, D1, R>
fn empty(scope: &G) -> Collection<G, D1, R>
Creates a new empty collection in scope
.
fn flat_map_fallible<D2, E, I, L>(
&self,
name: &str,
logic: L
) -> (Collection<G, D2, R>, Collection<G, E, R>) where
D2: Data,
E: Data,
I: IntoIterator<Item = Result<D2, E>>,
L: FnMut(D1) -> I + 'static,
fn flat_map_fallible<D2, E, I, L>(
&self,
name: &str,
logic: L
) -> (Collection<G, D2, R>, Collection<G, E, R>) where
D2: Data,
E: Data,
I: IntoIterator<Item = Result<D2, E>>,
L: FnMut(D1) -> I + 'static,
Like Collection::flat_map
, but logic
is allowed to fail. The first
returned collection will contain the successful applications of logic
,
while the second returned collection will contain the failed
applications.
Provided methods
fn map_fallible<D2, E, L>(
&self,
name: &str,
logic: L
) -> (Collection<G, D2, R>, Collection<G, E, R>) where
D2: Data,
E: Data,
L: FnMut(D1) -> Result<D2, E> + 'static,
fn map_fallible<D2, E, L>(
&self,
name: &str,
logic: L
) -> (Collection<G, D2, R>, Collection<G, E, R>) where
D2: Data,
E: Data,
L: FnMut(D1) -> Result<D2, E> + 'static,
Like Collection::map
, but logic
is allowed to fail. The first
returned collection will contain successful applications of logic
,
while the second returned collection will contain the failed
applications.