pub struct ExpectedStatSnapshot {
    pub name: &'static str,
    pub description: &'static str,
    pub stat_type: StatType,
    pub values: Vec<ExpectedStatSnapshotValue>,
    pub buckets: Option<Buckets>,
}
Expand description

ExpectedStatSnapshot helper. E.g. ExpectedStatSnapshot { name: “test_group_bucket_counter”, description: “Test cumulative bucket counter with groups”, stat_type: BucketCounter, values: vec![ ExpectedStatSnapshotValue { group_values: vec![“one”.to_string(), “two”.to_string()], bucket_limit: Some(BucketLimit::Num(-8)), value: 0f64, }, ExpectedStatSnapshotValue { group_values: vec![“one”.to_string(), “two”.to_string()], bucket_limit: Some(BucketLimit::Num(0)), value: 0f64, }, ExpectedStatSnapshotValue { group_values: vec![“one”.to_string(), “two”.to_string()], bucket_limit: Some(BucketLimit::Unbounded), value: 3f64, }, ExpectedStatSnapshotValue { group_values: vec![“three”.to_string(), “four”.to_string()], bucket_limit: Some(BucketLimit::Num(-8)), value: 4f64, }, ExpectedStatSnapshotValue { group_values: vec![“three”.to_string(), “four”.to_string()], bucket_limit: Some(BucketLimit::Num(0)), value: 4f64, }, ExpectedStatSnapshotValue { group_values: vec![“three”.to_string(), “four”.to_string()], bucket_limit: Some(BucketLimit::Unbounded), value: 4f64, }, ], buckets: Some(Buckets::new(BucketMethod::CumulFreq, “bucket”, &[-8, 0])), }

Fields§

§name: &'static str

Name of the stat

§description: &'static str

Description of the stat

§stat_type: StatType

Type of the stat

§values: Vec<ExpectedStatSnapshotValue>

A vec of the SnapShot values expected for this snapshot.

§buckets: Option<Buckets>

The buckets for the stat.

Trait Implementations§

source§

impl Debug for ExpectedStatSnapshot

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SendSyncUnwindSafe for Twhere T: Send + Sync + UnwindSafe + ?Sized,