pub trait Batch: Sized {
    type Input;
    type Output;
    // Required methods
    fn push(&mut self, item: Self::Input) -> PushResult<Self::Input>;
    fn is_empty(&self) -> bool;
    fn fresh(&self) -> Self;
    fn finish(self) -> Self::Output;
    fn num_items(&self) -> usize;
    // Provided method
    fn get_settings_defaults<D: SinkBatchSettings + Clone>(
        config: BatchConfig<D, Merged>,
    ) -> Result<BatchConfig<D, Merged>, BatchError> { ... }
}Required Associated Types§
Required Methods§
fn push(&mut self, item: Self::Input) -> PushResult<Self::Input>
fn is_empty(&self) -> bool
fn fresh(&self) -> Self
fn finish(self) -> Self::Output
fn num_items(&self) -> usize
Provided Methods§
sourcefn get_settings_defaults<D: SinkBatchSettings + Clone>(
    config: BatchConfig<D, Merged>,
) -> Result<BatchConfig<D, Merged>, BatchError>
 
fn get_settings_defaults<D: SinkBatchSettings + Clone>( config: BatchConfig<D, Merged>, ) -> Result<BatchConfig<D, Merged>, BatchError>
Turn the batch configuration into an actualized set of settings,
and deal with the proper behavior of max_size and if
max_bytes may be set. This is in the trait to ensure all batch
buffers implement it.
Object Safety§
This trait is not object safe.