Trait toad_common::array::Trunc

source ·
pub trait Truncwhere
    Self: Sized,
{ fn trunc(&mut self, len: usize); }
Expand description

Truncate this collection to a new length.

If self was shorter than len, nothing happens.

If self was longer, drops indices after len - 1.

Required Methods§

source

fn trunc(&mut self, len: usize)

Implementations on Foreign Types§

source§

impl<T> Trunc for Vec<T>

source§

fn trunc(&mut self, len: usize)

source§

impl<T, const N: usize> Trunc for ArrayVec<[T; N]>where
    T: Default,

source§

fn trunc(&mut self, len: usize)

Implementors§