Skip to main content

MergeEstimator

Trait MergeEstimator 

Source
pub trait MergeEstimator<L: MergeEstimationLogic + ?Sized>: EstimatorMut<L> {
    // Required method
    fn merge_with_helper(
        &mut self,
        backend: &L::Backend,
        helper: &mut L::Helper,
    );

    // Provided method
    fn merge(&mut self, backend: &L::Backend) { ... }
}
Expand description

An estimator capable of merging.

Required Methods§

Source

fn merge_with_helper(&mut self, backend: &L::Backend, helper: &mut L::Helper)

Merges a backend into self using the provided helper to avoid excessive allocations.

If you need to merge with the content of another estimator, just use as_ref on the estimator. This approach makes it possible to merge both owned and non-owned estimators.

Provided Methods§

Source

fn merge(&mut self, backend: &L::Backend)

Merges a backend into self.

If you need to merge with the content of another estimator, just use as_ref on the estimator. This approach makes it possible to merge both owned and non-owned estimators.

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.

Implementors§

Source§

impl<L: EstimationLogic + MergeEstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> MergeEstimator<L> for DefaultEstimator<L, BL, B>
where for<'a> Box<L::Backend>: From<&'a L::Backend>,