Struct sketches_ddsketch::DDSketch
source · [−]pub struct DDSketch { /* private fields */ }
Expand description
This struct represents a DDSketch
Implementations
sourceimpl DDSketch
impl DDSketch
sourcepub fn new(config: Config) -> Self
pub fn new(config: Config) -> Self
Construct a DDSketch
. Requires a Config
specifying the parameters of the sketch
sourcepub fn quantile(&self, q: f64) -> Result<Option<f64>, DDSketchError>
pub fn quantile(&self, q: f64) -> Result<Option<f64>, DDSketchError>
Return the quantile value for quantiles between 0.0 and 1.0. Result is an error, represented as DDSketchError::Quantile if the requested quantile is outside of that range.
If the sketch is empty the result is None, else Some(v) for the quantile value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DDSketch
impl Send for DDSketch
impl Sync for DDSketch
impl Unpin for DDSketch
impl UnwindSafe for DDSketch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more