Trait ExtendFromSliceUnchecked

Source
pub trait ExtendFromSliceUnchecked<T> {
    // Required method
    unsafe fn extend_from_slice_unchecked(&mut self, other: &[T]);
}
Expand description

A trait for extend_from_slice without the capacity check.

Required Methods§

Source

unsafe fn extend_from_slice_unchecked(&mut self, other: &[T])

Clones and appends all elements in a slice to the collection.

§Safety

The capacity of the collection must be sufficient for the new items.

Implementations on Foreign Types§

Source§

impl<T: Clone> ExtendFromSliceUnchecked<T> for Vec<T>

Source§

unsafe fn extend_from_slice_unchecked(&mut self, other: &[T])

Self::extend_from_slice without the capacity check.

§Safety

other.len() must be <= self.capacity() - self.len().

Implementors§