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: Clone + 'static> SizableContainer for Vec<T>

source§

fn capacity(&self) -> usize

source§

fn preferred_capacity() -> usize

source§

fn reserve(&mut self, additional: usize)

Implementors§