pub struct DefaultEstimator<L: EstimationLogic, BL: Borrow<L>, B> { /* private fields */ }Expand description
A default estimator for generic EstimationLogic and backends.
Implementations§
Source§impl<L: EstimationLogic, BL: Borrow<L>, B> DefaultEstimator<L, BL, B>
impl<L: EstimationLogic, BL: Borrow<L>, B> DefaultEstimator<L, BL, B>
Trait Implementations§
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsMut<L::Backend>> AsMut<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsMut<L::Backend>> AsMut<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> AsRef<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> AsRef<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> Estimator<L> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> Estimator<L> for DefaultEstimator<L, BL, B>
Source§type OwnedEstimator = DefaultEstimator<L, L, Box<<L as EstimationLogic>::Backend>>
type OwnedEstimator = DefaultEstimator<L, L, Box<<L as EstimationLogic>::Backend>>
The type returned by
Estimator::into_owned.Source§fn estimate(&self) -> f64
fn estimate(&self) -> f64
Returns an estimation of the number of distinct elements that have been
added to the estimator so far.
Source§fn into_owned(self) -> Self::OwnedEstimator
fn into_owned(self) -> Self::OwnedEstimator
Converts this estimator into an owned version capable of mutation.
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> EstimatorMut<L> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> EstimatorMut<L> for DefaultEstimator<L, BL, B>
Source§impl<L: EstimationLogic + MergeEstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> MergeEstimator<L> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + MergeEstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> MergeEstimator<L> for DefaultEstimator<L, BL, B>
Auto Trait Implementations§
impl<L, BL, B> Freeze for DefaultEstimator<L, BL, B>
impl<L, BL, B> RefUnwindSafe for DefaultEstimator<L, BL, B>
impl<L, BL, B> Send for DefaultEstimator<L, BL, B>
impl<L, BL, B> Sync for DefaultEstimator<L, BL, B>
impl<L, BL, B> Unpin for DefaultEstimator<L, BL, B>
impl<L, BL, B> UnsafeUnpin for DefaultEstimator<L, BL, B>where
BL: UnsafeUnpin,
B: UnsafeUnpin,
impl<L, BL, B> UnwindSafe for DefaultEstimator<L, BL, B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more