Trait tange_collection::interfaces::Accumulator
source · pub trait Accumulator<A>: Send + Sync + Clone {
type VW: ValueWriter<A>;
fn writer(&self) -> Self::VW;
fn write_vec(
&self,
vs: Vec<A>
) -> <<Self as Accumulator<A>>::VW as ValueWriter<A>>::Out { ... }
}
Expand description
Accumulators are object which can create ‘Writers’, using effectively the Builder pattern
Required Associated Types§
sourcetype VW: ValueWriter<A>
type VW: ValueWriter<A>
ValueWriter created
Required Methods§
Provided Methods§
sourcefn write_vec(
&self,
vs: Vec<A>
) -> <<Self as Accumulator<A>>::VW as ValueWriter<A>>::Out
fn write_vec(
&self,
vs: Vec<A>
) -> <<Self as Accumulator<A>>::VW as ValueWriter<A>>::Out
Convert a Vec into a ValueWriter output