pub trait CounterRepr:
Sealed
+ Default
+ Debug
+ TestOnlyPartialEq {
// Required methods
fn get(&self) -> u64;
fn new(value: u64) -> Self;
// Provided method
fn cast<C: CounterRepr>(&self) -> C { ... }
}
Expand description
A marker trait to indicate types that may be used as a counter.
Required Methods§
Provided Methods§
Sourcefn cast<C: CounterRepr>(&self) -> C
fn cast<C: CounterRepr>(&self) -> C
Convert one CounterRepr
into another CounterRepr
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl CounterRepr for u64
Available on crate features testutils
only.
impl CounterRepr for u64
Available on crate features
testutils
only.