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§
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.
impl<T: Default + Sized + Copy> ZeroedBuffer for VecDeque<T>
Available on crate feature
alloc only.Source§impl<T: Default + Sized + Copy> ZeroedBuffer for Vec<T>
Available on crate feature alloc only.
impl<T: Default + Sized + Copy> ZeroedBuffer for Vec<T>
Available on crate feature
alloc only.