pub struct Counter { /* private fields */ }Expand description
A thread-safe diagnostic handle representing a self-declared kernel counter.
This structure contains a pointer to the counter’s static Descriptor layout in memory,
and delegates increment, minimum, and maximum operations to highly optimized C++ FFI
handlers with zero runtime overhead under ThinLTO.
Implementations§
Source§impl Counter
impl Counter
Sourcepub const unsafe fn new_with_ptr(descriptor: *const Descriptor) -> Self
pub const unsafe fn new_with_ptr(descriptor: *const Descriptor) -> Self
Create a new Counter handle using the direct descriptor pointer address.
§Safety
This should only be called with a pointer to a valid, linker-defined static descriptor variable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Counter
impl RefUnwindSafe for Counter
impl Unpin for Counter
impl UnsafeUnpin for Counter
impl UnwindSafe for Counter
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