Skip to main content

VecExt

Trait VecExt 

Source
pub trait VecExt<T> {
    // Required methods
    unsafe fn uninitialized_resize(&mut self, new_len: usize);
    unsafe fn zeroed_resize(&mut self, new_len: usize);
}
Expand description

Extension methods for vector types

Required Methods§

Source

unsafe fn uninitialized_resize(&mut self, new_len: usize)

Unsafely resize a vector to the specified size, without initializing the memory.

Source

unsafe fn zeroed_resize(&mut self, new_len: usize)

Unsafely resize a vector to the specified size, zeroing the memory.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> VecExt<T> for Vec<T>

Source§

unsafe fn uninitialized_resize(&mut self, new_len: usize)

Source§

unsafe fn zeroed_resize(&mut self, new_len: usize)

Implementors§