DynVec

Type Alias DynVec 

Source
pub type DynVec = RawDynVec<Chunks>;
Expand description

A dynamic vector, able to store any kind of data.

Aliased Type§

pub struct DynVec { /* private fields */ }

Implementations§

Source§

impl DynVec

Source

pub fn new() -> Self

Allocates a new DynVec with a minimal chunk size of 1024 bytes.

Source

pub fn with_chunk_size(min_chunk_size: usize) -> Self

Creates a new DynVec with the given chunk size. Note that chunks can be allocated with a larger size if large objects need to be inserted.

Source

pub fn with_chunks(min_chunk_size: usize, chunk_count: usize) -> Self

Creates a new DynVec with the given chunk size and chunk count. This function allocates chunk_count chunks in advance.

Trait Implementations§

Source§

impl Default for DynVec

Source§

fn default() -> Self

Creates a new empty DynVec with a minimal chunk size of 1024 bytes.