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<Self, Error>
pub fn new(values: Vec<T>, format: ArrayFormat) -> Result<Self, 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> Clone for ArrayContent<T>
impl<T: Clone> Clone for ArrayContent<T>
source§fn clone(&self) -> ArrayContent<T>
fn clone(&self) -> ArrayContent<T>
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<T> CondensableOnDemand for ArrayContent<T>
impl<T> CondensableOnDemand for ArrayContent<T>
fn condense_histogram(&mut self)
source§impl<T: Debug> Debug for ArrayContent<T>
impl<T: Debug> Debug for ArrayContent<T>
source§impl<T: PartialEq> PartialEq for ArrayContent<T>
impl<T: PartialEq> PartialEq for ArrayContent<T>
source§fn eq(&self, other: &ArrayContent<T>) -> bool
fn eq(&self, other: &ArrayContent<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ArrayContent<f64>
impl Serialize for ArrayContent<f64>
source§impl Serialize for ArrayContent<i64>
impl Serialize for ArrayContent<i64>
source§impl Serialize for ArrayContent<u64>
impl Serialize for ArrayContent<u64>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)