pub struct NumericStateRecorder<T: RecordableNumericType> { /* private fields */ }Implementations§
Source§impl<T: RecordableNumericType> NumericStateRecorder<T>
impl<T: RecordableNumericType> NumericStateRecorder<T>
Sourcepub fn new(
name: String,
trace_category: &'static CStr,
units: Units,
range: Option<(T, T)>,
options: RecorderOptions,
) -> Result<Self, StateRecorderError>
pub fn new( name: String, trace_category: &'static CStr, units: Units, range: Option<(T, T)>, options: RecorderOptions, ) -> Result<Self, StateRecorderError>
Creates a new NumericStateRecorder.
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, state_value: T)
Trait Implementations§
Source§impl<T: RecordableNumericType> Drop for NumericStateRecorder<T>
impl<T: RecordableNumericType> Drop for NumericStateRecorder<T>
Auto Trait Implementations§
impl<T> Freeze for NumericStateRecorder<T>
impl<T> !RefUnwindSafe for NumericStateRecorder<T>
impl<T> Send for NumericStateRecorder<T>
impl<T> Sync for NumericStateRecorder<T>
impl<T> Unpin for NumericStateRecorder<T>where
T: Unpin,
impl<T> UnsafeUnpin for NumericStateRecorder<T>
impl<T> !UnwindSafe for NumericStateRecorder<T>
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