pub struct NamedU64StateRecorder { /* private fields */ }Expand description
Records time series data for an named-u64 value state. This is best-suited for categorical observations, where the name of the state and not a numeric value will be most relevant for diagnostic and forensic purposes.
Implementations§
Source§impl NamedU64StateRecorder
impl NamedU64StateRecorder
Sourcepub fn new(
name: String,
trace_category: &'static CStr,
state_names_map: HashMap<u64, String>,
options: RecorderOptions,
) -> Result<Self, StateRecorderError>
pub fn new( name: String, trace_category: &'static CStr, state_names_map: HashMap<u64, String>, options: RecorderOptions, ) -> Result<Self, StateRecorderError>
Creates a new NamedU64StateRecorder with a given name and a map of u64 to state names.
See RecorderOptions for more details on options that can be specified.
Errors:
- StateRecorderError::DuplicateName:
metadata.nameis already in use by a StateRecorder associated withmanager. - StateRecorderError::IncompatibleString: Either
nameor the display name of a state cannot be converted to a CString. - StateRecorderError::InvalidOptions:
optionsis invalid for the given mode.
pub fn record(&mut self, val: u64)
Trait Implementations§
Source§impl Debug for NamedU64StateRecorder
impl Debug for NamedU64StateRecorder
Auto Trait Implementations§
impl Freeze for NamedU64StateRecorder
impl !RefUnwindSafe for NamedU64StateRecorder
impl Send for NamedU64StateRecorder
impl Sync for NamedU64StateRecorder
impl Unpin for NamedU64StateRecorder
impl UnsafeUnpin for NamedU64StateRecorder
impl !UnwindSafe for NamedU64StateRecorder
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§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