Struct itron_solid_asp3::memorypool::MemoryPool[][src]

pub struct MemoryPool(_);
This is supported on crate features unstable and dcre only.
Expand description

An owned memory pool.

Deletes the memory pool automatically when dropped. The destructor will panic if the deletion fails.

Implementations

acre_mpf: Create a builder for MemoryPool.

Examples
use itron::memorypool::MemoryPool;
let pool = MemoryPool::build()
    .block_size(32)
    .block_count(4)
    .finish()
    .expect("failed to create a memory pool");

let block = pool.as_ref().get()
   .expect("failed to allocate a block");
pool.as_ref().release(block)
   .expect("failed to deallocate a block");

Construct a MemoryPool from a raw object ID.

Safety

See Object ID Wrappers.

Consume and “leak” self, returning a reference MemoryPoolRef<'a>.

Get the raw object ID.

Get the raw object ID as abi::NonNullID.

Borrow MemoryPool as MemoryPoolRef.

Use this to perform operations on memory pools because most of the methods are implemented on MemoryPoolRef but not MemoryPool.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

Performs the conversion.

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.