pub trait Distributor<C> {
// Required methods
fn partition<T: Clone, P: Push<Message<T, C>>>(
&mut self,
container: &mut C,
time: &T,
pushers: &mut [P],
);
fn flush<T: Clone, P: Push<Message<T, C>>>(
&mut self,
time: &T,
pushers: &mut [P],
);
fn relax(&mut self);
}
Expand description
Distribute containers to several pushers.
A distributor sits behind an exchange pusher, and partitions containers at a given time
into several pushers. It can use Message::push_at
to push its outputs at the desired
pusher.
It needs to uphold progress tracking requirements. The count of the input container
must be preserved across the output containers, from the first call to partition
until the
call to flush
for a specific time stamp.
Required Methods§
Sourcefn partition<T: Clone, P: Push<Message<T, C>>>(
&mut self,
container: &mut C,
time: &T,
pushers: &mut [P],
)
fn partition<T: Clone, P: Push<Message<T, C>>>( &mut self, container: &mut C, time: &T, pushers: &mut [P], )
Partition the contents of container
at time
into the pushers
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.