ZeroVec

Trait ZeroVec 

Source
pub trait ZeroVec {
    // Required method
    fn zero_len(&mut self, len: usize);
}
Expand description

A trait for vectors that can be resized and filled with default values.

Provides functionality to clear a vector and resize it to a specific length, filling all positions with the default value of the element type. This is useful for initializing or resetting vectors to a known state.

Required Methods§

Source

fn zero_len(&mut self, len: usize)

Clears the vector and resizes it to the specified length, filling with default values.

§Arguments
  • len - The desired length of the vector

Implementations on Foreign Types§

Source§

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

Source§

fn zero_len(&mut self, len: usize)

Implementors§