pub struct CountingAlloc<A>where
A: GlobalAlloc,{ /* private fields */ }Expand description
A simple allocator that counts the number of bytes allocated and deallocated.
Implementations§
Source§impl<A> CountingAlloc<A>where
A: GlobalAlloc,
impl<A> CountingAlloc<A>where
A: GlobalAlloc,
Trait Implementations§
Source§impl<A> GlobalAlloc for CountingAlloc<A>where
A: GlobalAlloc,
impl<A> GlobalAlloc for CountingAlloc<A>where
A: GlobalAlloc,
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout. Read moreAuto Trait Implementations§
impl<A> !Freeze for CountingAlloc<A>
impl<A> RefUnwindSafe for CountingAlloc<A>where
A: RefUnwindSafe,
impl<A> Send for CountingAlloc<A>where
A: Send,
impl<A> Sync for CountingAlloc<A>where
A: Sync,
impl<A> Unpin for CountingAlloc<A>where
A: Unpin,
impl<A> UnwindSafe for CountingAlloc<A>where
A: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more