pub enum ArrayContent<T> {
    Values(Vec<T>),
    LinearHistogram(LinearHistogram<T>),
    ExponentialHistogram(ExponentialHistogram<T>),
}Expand description
Represents the content of a DiagnosticsHierarchy array property: a regular array or a linear/exponential histogram.
Variants§
Values(Vec<T>)
The contents of an array.
LinearHistogram(LinearHistogram<T>)
The data for a linear histogram.
ExponentialHistogram(ExponentialHistogram<T>)
Implementations§
Source§impl<T> ArrayContent<T>
 
impl<T> ArrayContent<T>
Sourcepub fn new(
    values: Vec<T>,
    format: ArrayFormat,
) -> Result<ArrayContent<T>, Error>
 
pub fn new( values: Vec<T>, format: ArrayFormat, ) -> Result<ArrayContent<T>, Error>
Creates a new ArrayContent parsing the values based on the given format.
Sourcepub fn raw_values(&self) -> Cow<'_, Vec<T>>
 
pub fn raw_values(&self) -> Cow<'_, Vec<T>>
Returns the raw values of this Array content. In the case of a histogram, returns the bucket counts.
Trait Implementations§
Source§impl<T> Clone for ArrayContent<T>where
    T: Clone,
 
impl<T> Clone for ArrayContent<T>where
    T: Clone,
Source§fn clone(&self) -> ArrayContent<T>
 
fn clone(&self) -> ArrayContent<T>
Returns a duplicate 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<T> CondensableOnDemand for ArrayContent<T>
 
impl<T> CondensableOnDemand for ArrayContent<T>
fn condense_histogram(&mut self)
Source§impl<T> Debug for ArrayContent<T>where
    T: Debug,
 
impl<T> Debug for ArrayContent<T>where
    T: Debug,
Source§impl<T> PartialEq for ArrayContent<T>where
    T: PartialEq,
 
impl<T> PartialEq for ArrayContent<T>where
    T: PartialEq,
Source§impl Serialize for ArrayContent<f64>
 
impl Serialize for ArrayContent<f64>
Source§fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Serialize for ArrayContent<i64>
 
impl Serialize for ArrayContent<i64>
Source§fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Serialize for ArrayContent<u64>
 
impl Serialize for ArrayContent<u64>
Source§fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> StructuralPartialEq for ArrayContent<T>
Auto Trait Implementations§
impl<T> Freeze for ArrayContent<T>where
    T: Freeze,
impl<T> RefUnwindSafe for ArrayContent<T>where
    T: RefUnwindSafe,
impl<T> Send for ArrayContent<T>where
    T: Send,
impl<T> Sync for ArrayContent<T>where
    T: Sync,
impl<T> Unpin for ArrayContent<T>where
    T: Unpin,
impl<T> UnwindSafe for ArrayContent<T>where
    T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more