Struct logging_allocator::LoggingAllocator
source · pub struct LoggingAllocator<A = System> { /* private fields */ }
Expand description
A wrapper allocator that logs messages on allocation.
Implementations
sourceimpl LoggingAllocator<System>
impl LoggingAllocator<System>
sourceimpl<A> LoggingAllocator<A>
impl<A> LoggingAllocator<A>
pub const fn with_allocator(allocator: A) -> Self
pub fn enable_logging(&self)
pub fn disable_logging(&self)
pub fn logging_enabled(&self) -> bool
Trait Implementations
sourceimpl<A> GlobalAlloc for LoggingAllocator<A>where
A: GlobalAlloc,
impl<A> GlobalAlloc for LoggingAllocator<A>where
A: GlobalAlloc,
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given
layout
. Read moreAuto Trait Implementations
impl<A> RefUnwindSafe for LoggingAllocator<A>where
A: RefUnwindSafe,
impl<A> Send for LoggingAllocator<A>where
A: Send,
impl<A> Sync for LoggingAllocator<A>where
A: Sync,
impl<A> Unpin for LoggingAllocator<A>where
A: Unpin,
impl<A> UnwindSafe for LoggingAllocator<A>where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more