#[non_exhaustive]pub struct Exponential {
pub num_finite_buckets: i32,
pub growth_factor: f64,
pub scale: f64,
}Expand description
Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.
There are num_finite_buckets + 2 (= N) buckets. Bucket i has the
following boundaries:
Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.num_finite_buckets: i32Must be greater than 0.
growth_factor: f64Must be greater than 1.
scale: f64Must be greater than 0.
Implementations§
Source§impl Exponential
impl Exponential
Sourcepub fn set_num_finite_buckets<T: Into<i32>>(self, v: T) -> Self
pub fn set_num_finite_buckets<T: Into<i32>>(self, v: T) -> Self
Sets the value of num_finite_buckets.
Sourcepub fn set_growth_factor<T: Into<f64>>(self, v: T) -> Self
pub fn set_growth_factor<T: Into<f64>>(self, v: T) -> Self
Sets the value of growth_factor.
Trait Implementations§
Source§impl Clone for Exponential
impl Clone for Exponential
Source§fn clone(&self) -> Exponential
fn clone(&self) -> Exponential
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Exponential
impl Debug for Exponential
Source§impl Default for Exponential
impl Default for Exponential
Source§fn default() -> Exponential
fn default() -> Exponential
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Exponentialwhere
Exponential: Default,
impl<'de> Deserialize<'de> for Exponentialwhere
Exponential: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for Exponential
impl Message for Exponential
Source§impl PartialEq for Exponential
impl PartialEq for Exponential
Source§impl Serialize for Exponential
impl Serialize for Exponential
impl StructuralPartialEq for Exponential
Auto Trait Implementations§
impl Freeze for Exponential
impl RefUnwindSafe for Exponential
impl Send for Exponential
impl Sync for Exponential
impl Unpin for Exponential
impl UnwindSafe for Exponential
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