Struct tracking_allocator::Allocator[][src]

pub struct Allocator<A> { /* fields omitted */ }
Expand description

Tracking allocator implementation.

This allocator must be installed via #[global_allocator] in order to take effect. More information on using this allocator can be found in the examples, or directly in the standard library docs for GlobalAlloc.

Implementations

Creates a new Allocator that wraps another allocator.

Creates a new Allocator that wraps the system allocator.

Trait Implementations

Returns the “default value” for a type. Read more

Allocate memory as described by the given layout. Read more

Deallocate the block of memory at the given ptr pointer with the given layout. Read more

Behaves like alloc, but also ensures that the contents are set to zero before being returned. Read more

Shrink or grow a block of memory to the given new_size. The block is described by the given ptr pointer and layout. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more