pub struct IntCounter {
pub name: &'static str,
/* private fields */
}
Expand description
An Integer Counter for Hyperlight
A named counter backed by an AtomicU64
Fields§
§name: &'static str
The name of the counter
Implementations§
Trait Implementations§
Source§impl Debug for IntCounter
impl Debug for IntCounter
Source§impl From<IntCounter> for HyperlightMetric
impl From<IntCounter> for HyperlightMetric
Source§fn from(counter: IntCounter) -> Self
fn from(counter: IntCounter) -> Self
Converts to this type from the input type.
Source§impl<S: HyperlightMetricOps> GetHyperlightMetric<IntCounter> for S
impl<S: HyperlightMetricOps> GetHyperlightMetric<IntCounter> for S
Source§fn metric(&self) -> Result<&IntCounter>
fn metric(&self) -> Result<&IntCounter>
Converts the metric into a HyperlightMetric
Source§impl<'a> TryFrom<&'a HyperlightMetric> for &'a IntCounter
impl<'a> TryFrom<&'a HyperlightMetric> for &'a IntCounter
Source§type Error = HyperlightError
type Error = HyperlightError
The type returned in the event of a conversion error.
Source§fn try_from(metric: &'a HyperlightMetric) -> Result<Self>
fn try_from(metric: &'a HyperlightMetric) -> Result<Self>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for IntCounter
impl RefUnwindSafe for IntCounter
impl Send for IntCounter
impl Sync for IntCounter
impl Unpin for IntCounter
impl UnwindSafe for IntCounter
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