Skip to main content

Poolable

Trait Poolable 

Source
pub trait Poolable {
    // Required methods
    fn capacity(&self) -> usize;
    fn alloc(size: usize) -> Self;
}
Expand description

The trait required to be able to use a type in BytePool.

Required Methods§

Source

fn capacity(&self) -> usize

Source

fn alloc(size: usize) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<K, V, S> Poolable for HashMap<K, V, S>
where K: Eq + Hash, S: BuildHasher + Default,

Source§

fn capacity(&self) -> usize

Source§

fn alloc(size: usize) -> Self

Source§

impl<T: Default + Clone> Poolable for Vec<T>

Source§

fn capacity(&self) -> usize

Source§

fn alloc(size: usize) -> Self

Implementors§