Trait timely::container::SizableContainer

source ·
pub trait SizableContainer: Container {
    // Required methods
    fn capacity(&self) -> usize;
    fn preferred_capacity() -> usize;
    fn reserve(&mut self, additional: usize);
}
Expand description

A container that can be sized and reveals its capacity.

Required Methods§

source

fn capacity(&self) -> usize

Return the capacity of the container.

source

fn preferred_capacity() -> usize

Return the preferred capacity of the container.

source

fn reserve(&mut self, additional: usize)

Reserve space for additional elements, possibly increasing the capacity of the container.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> SizableContainer for Vec<T>
where T: Clone + 'static,

source§

fn capacity(&self) -> usize

source§

fn preferred_capacity() -> usize

source§

fn reserve(&mut self, additional: usize)

Implementors§

source§

impl<R> SizableContainer for FlatStack<R>
where R: Region + Clone + 'static,

source§

impl<T> SizableContainer for TimelyStack<T>
where T: Columnation + 'static,