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§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)