[−][src]Struct alloc_compose::stats::Counter
A primitive counter for collectiong statistics.
Methods
impl Counter[src]
pub fn num_allocs(&self) -> u64[src]
Returns the number of alloc calls.
pub fn num_deallocs(&self) -> u64[src]
Returns the number of dealloc calls.
pub fn num_grows(&self) -> u64[src]
Returns the number of grow calls.
pub fn num_shrinks(&self) -> u64[src]
Returns the number of shrink calls.
pub fn num_owns(&self) -> u64[src]
Returns the number of owns calls.
Trait Implementations
impl CallbackRef for Counter[src]
fn alloc(
&self,
_layout: Layout,
_init: AllocInit,
_result: Result<MemoryBlock, AllocErr>
)[src]
&self,
_layout: Layout,
_init: AllocInit,
_result: Result<MemoryBlock, AllocErr>
)
fn dealloc(&self, _ptr: NonNull<u8>, _layout: Layout)[src]
fn grow(
&self,
_ptr: NonNull<u8>,
_layout: Layout,
_new_size: usize,
_placement: ReallocPlacement,
_init: AllocInit,
_result: Result<MemoryBlock, AllocErr>
)[src]
&self,
_ptr: NonNull<u8>,
_layout: Layout,
_new_size: usize,
_placement: ReallocPlacement,
_init: AllocInit,
_result: Result<MemoryBlock, AllocErr>
)
fn shrink(
&self,
_ptr: NonNull<u8>,
_layout: Layout,
_new_size: usize,
_placement: ReallocPlacement,
_result: Result<MemoryBlock, AllocErr>
)[src]
&self,
_ptr: NonNull<u8>,
_layout: Layout,
_new_size: usize,
_placement: ReallocPlacement,
_result: Result<MemoryBlock, AllocErr>
)
fn owns(&self, _success: bool)[src]
fn by_ref(&self) -> &Self[src]
impl Debug for Counter[src]
impl Default for Counter[src]
impl Eq for Counter[src]
impl PartialEq<AtomicCounter> for Counter[src]
fn eq(&self, other: &AtomicCounter) -> bool[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialEq<Counter> for Counter[src]
impl PartialEq<Counter> for AtomicCounter[src]
impl StructuralEq for Counter[src]
impl StructuralPartialEq for Counter[src]
Auto Trait Implementations
impl !RefUnwindSafe for Counter
impl Send for Counter
impl !Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,