pub trait PrefixExtender<G: Scope, R: Monoid + Multiply<Output = R>> {
type Prefix;
type Extension;
// Required methods
fn count(
&mut self,
prefixes: &Collection<G, (Self::Prefix, usize, usize), R>,
index: usize,
) -> Collection<G, (Self::Prefix, usize, usize), R>;
fn propose(
&mut self,
prefixes: &Collection<G, Self::Prefix, R>,
) -> Collection<G, (Self::Prefix, Self::Extension), R>;
fn validate(
&mut self,
extensions: &Collection<G, (Self::Prefix, Self::Extension), R>,
) -> Collection<G, (Self::Prefix, Self::Extension), R>;
}
Expand description
A type capable of extending a stream of prefixes.
Implementors of PrefixExtension
provide types and methods for extending a differential dataflow collection,
via the three methods count
, propose
, and validate
.
Required Associated Types§
Required Methods§
Sourcefn count(
&mut self,
prefixes: &Collection<G, (Self::Prefix, usize, usize), R>,
index: usize,
) -> Collection<G, (Self::Prefix, usize, usize), R>
fn count( &mut self, prefixes: &Collection<G, (Self::Prefix, usize, usize), R>, index: usize, ) -> Collection<G, (Self::Prefix, usize, usize), R>
Annotates prefixes with the number of extensions the relation would propose.
Sourcefn propose(
&mut self,
prefixes: &Collection<G, Self::Prefix, R>,
) -> Collection<G, (Self::Prefix, Self::Extension), R>
fn propose( &mut self, prefixes: &Collection<G, Self::Prefix, R>, ) -> Collection<G, (Self::Prefix, Self::Extension), R>
Extends each prefix with corresponding extensions.
Sourcefn validate(
&mut self,
extensions: &Collection<G, (Self::Prefix, Self::Extension), R>,
) -> Collection<G, (Self::Prefix, Self::Extension), R>
fn validate( &mut self, extensions: &Collection<G, (Self::Prefix, Self::Extension), R>, ) -> Collection<G, (Self::Prefix, Self::Extension), R>
Restricts proposed extensions by those the extender would have proposed.