Trait PushUnchecked

Source
pub trait PushUnchecked<T> {
    // Required method
    unsafe fn push_unchecked(&mut self, value: T);
}
Expand description

A trait for push without the capacity check.

Required Methods§

Source

unsafe fn push_unchecked(&mut self, value: T)

Appends an element to the back of a collection without the capacity check.

§Safety

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

Implementations on Foreign Types§

Source§

impl<T> PushUnchecked<T> for Vec<T>

Source§

unsafe fn push_unchecked(&mut self, value: T)

Self::push without the capacity check.

§Safety

self.len() must be < self.capacity().

Implementors§

Source§

impl<S: GenericString> PushUnchecked<char> for S