pub struct CombinedCounter { /* private fields */ }Expand description
Per-thread, per-object combined packets and bytes counters
Implementations§
Source§impl CombinedCounter
impl CombinedCounter
Sourcepub fn allocate_index(
&self,
_vm: &BarrierHeldMainRef,
index: u32,
) -> CombinedCounterIndex<'_>
pub fn allocate_index( &self, _vm: &BarrierHeldMainRef, index: u32, ) -> CombinedCounterIndex<'_>
Allocate the given index for use, zeroing it in the process
This is similar to the VPP C API vlib_validate_combined_counter.
Note that no checks are performed to ensure that the index isn’t already in use, but it doesn’t result in unsoundness if the same value is allocated for an already-allocated and not dropped index.
Trait Implementations§
Source§impl Drop for CombinedCounter
impl Drop for CombinedCounter
impl Send for CombinedCounter
impl Sync for CombinedCounter
Auto Trait Implementations§
impl Freeze for CombinedCounter
impl RefUnwindSafe for CombinedCounter
impl Unpin for CombinedCounter
impl UnsafeUnpin for CombinedCounter
impl UnwindSafe for CombinedCounter
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