pub struct SimpleCounterIndex<'counter> { /* private fields */ }Expand description
An allocated index for a SimpleCounter
Implementations§
Source§impl<'counter> SimpleCounterIndex<'counter>
impl<'counter> SimpleCounterIndex<'counter>
Sourcepub fn into_parts(self) -> (&'counter SimpleCounter, u32)
pub fn into_parts(self) -> (&'counter SimpleCounter, u32)
Decomposes a simple counter index into its component parts
Sourcepub unsafe fn from_parts(counter: &'counter SimpleCounter, index: u32) -> Self
pub unsafe fn from_parts(counter: &'counter SimpleCounter, index: u32) -> Self
Creates a SimpleCounterIndex from component parts
§Safety
- Must only be done from VPP worker threads or the main thread
indexmust be a valid (previously allocated) index for the counter
Trait Implementations§
impl Send for SimpleCounterIndex<'_>
impl Sync for SimpleCounterIndex<'_>
Auto Trait Implementations§
impl<'counter> Freeze for SimpleCounterIndex<'counter>
impl<'counter> RefUnwindSafe for SimpleCounterIndex<'counter>
impl<'counter> Unpin for SimpleCounterIndex<'counter>
impl<'counter> UnsafeUnpin for SimpleCounterIndex<'counter>
impl<'counter> UnwindSafe for SimpleCounterIndex<'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