pub trait GrowingVec<T> {
    // Required methods
    fn with_capacity(cap: usize) -> Self;
    fn push(&mut self, elem: T);
}
Expand description

A vector with two operations: with_capacity and push.

Required Methods§

source

fn with_capacity(cap: usize) -> Self

Create the collection with the given capacity.

source

fn push(&mut self, elem: T)

Push to the vector the elem.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl GrowingVec<ColId> for ColListBuilder

source§

fn with_capacity(_: usize) -> Self

source§

fn push(&mut self, elem: ColId)

source§

impl<T> GrowingVec<T> for Vec<T>

source§

fn with_capacity(cap: usize) -> Self

source§

fn push(&mut self, elem: T)

source§

impl<T, const N: usize> GrowingVec<T> for SmallVec<[T; N]>

source§

fn with_capacity(cap: usize) -> Self

source§

fn push(&mut self, elem: T)

Implementors§