Type Alias cranelift_codegen::ir::instructions::ValueListPool

source ·
pub type ValueListPool = ListPool<Value>;
Expand description

Memory pool for holding value lists. See ValueList.

Aliased Type§

struct ValueListPool { /* private fields */ }

Implementations

source§

impl<T> ListPool<T>

source

pub fn new() -> ListPool<T>

Create a new list pool.

source

pub fn with_capacity(len: usize) -> ListPool<T>

Create a new list pool with the given capacity for data pre-allocated.

source

pub fn capacity(&self) -> usize

Get the capacity of this pool. This will be somewhat higher than the total length of lists that can be stored without reallocating, because of internal metadata overheads. It is mostly useful to allow another pool to be allocated that is likely to hold data transferred from this one without the need to grow.

source

pub fn clear(&mut self)

Clear the pool, forgetting about all lists that use it.

This invalidates any existing entity lists that used this pool to allocate memory.

The pool’s memory is not released to the operating system, but kept around for faster allocation in the future.

Trait Implementations

source§

impl<T> Clone for ListPool<T>

source§

fn clone(&self) -> ListPool<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for ListPool<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for ListPool<T>

source§

fn default() -> ListPool<T>

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

impl<'de, T> Deserialize<'de> for ListPool<T>

source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ListPool<T>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T> Hash for ListPool<T>

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> PartialEq for ListPool<T>

source§

fn eq(&self, other: &ListPool<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for ListPool<T>

source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more