Struct type_erased_vec::TypeErasedVec[][src]

pub struct TypeErasedVec<A: Allocator = Global> { /* fields omitted */ }
Expand description

A type erased Vec.

Implementations

Constructs a new, empty TypeErasedVec. See Vec::new_in.

Constructs a new, empty TypeErasedVec with specified capacity. See Vec::with_capacity_in.

Erases the type of vec.

Returns if self is leaked.

Converts to Vec<T>.

Safety

T must be the same type used constructing this TypeErasedVec.

Constructors include new, new_in, with_capacity, with_capacity_in, from_vec.

Panics

Panics if self is leaked.

Gets a reference to [T].

Safety

See TypeErasedVec::into_vec.

Panics

Panics if self is leaked.

Gets a smart pointer to mut Vec<T>.

Safety

See TypeErasedVec::into_vec.

Panics

Panics if self is leaked.

Gets a reference to the underlying allocator.

Panics

Panics if self is leaked.

Constructs a new, empty TypeErasedVec. See Vec::new.

Constructs a new, empty TypeErasedVec with specified capacity. See Vec::with_capacity.

Gets a smart pointer to Vec<T>.

This is usually not want you want. Check TypeErasedVec::get instead.

This method is only implemented for TypeErasedVec<Global> because we can’t get a Vec back without giving it a allocator.

Safety

See TypeErasedVec::into_vec.

Panics

Panics if self is leaked.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. 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.

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.