pub struct TimingEnforcer { /* private fields */ }Expand description
Timing enforcer for execution
Implementations§
Source§impl TimingEnforcer
impl TimingEnforcer
Sourcepub fn with_constraint(
self,
name: impl Into<String>,
constraint: TimingGuarantee,
) -> Self
pub fn with_constraint( self, name: impl Into<String>, constraint: TimingGuarantee, ) -> Self
Register a timing constraint
Sourcepub fn record_measurement(
self,
name: impl Into<String>,
measurement: TimingMeasurement,
) -> Self
pub fn record_measurement( self, name: impl Into<String>, measurement: TimingMeasurement, ) -> Self
Register a measurement
Sourcepub fn measurements(&self) -> &[(String, TimingMeasurement)]
pub fn measurements(&self) -> &[(String, TimingMeasurement)]
Get all measurements
Sourcepub fn stats(&self) -> TimingStats
pub fn stats(&self) -> TimingStats
Compute statistics
Trait Implementations§
Source§impl Clone for TimingEnforcer
impl Clone for TimingEnforcer
Source§fn clone(&self) -> TimingEnforcer
fn clone(&self) -> TimingEnforcer
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 moreAuto Trait Implementations§
impl Freeze for TimingEnforcer
impl RefUnwindSafe for TimingEnforcer
impl Send for TimingEnforcer
impl Sync for TimingEnforcer
impl Unpin for TimingEnforcer
impl UnwindSafe for TimingEnforcer
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