ZeroedBuffer

Trait ZeroedBuffer 

Source
pub trait ZeroedBuffer {
    type Output;

    // Required method
    fn new_zeroed(capacity: usize) -> Self::Output;
}
Expand description

Trait used for things like Vec and [VecDeq] to pre-allocate and fill with zeros.

Required Associated Types§

Required Methods§

Source

fn new_zeroed(capacity: usize) -> Self::Output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Default + Sized + Copy> ZeroedBuffer for VecDeque<T>

Available on crate feature alloc only.
Source§

type Output = VecDeque<T>

Source§

fn new_zeroed(capacity: usize) -> Self::Output

Source§

impl<T: Default + Sized + Copy> ZeroedBuffer for Vec<T>

Available on crate feature alloc only.
Source§

type Output = Vec<T>

Source§

fn new_zeroed(capacity: usize) -> Self::Output

Implementors§