pub trait AppendCopy<T: Copy> {
    // Required method
    fn append_copy(&mut self, i: &[T]);
}
Expand description

Collections that support extending themselves mutably from copyable slices

Required Methods§

source

fn append_copy(&mut self, i: &[T])

Extend self mutably, copying from a slice.

Worst-case implementations copy 1 element at a time (time O(n))

Best-case implementations copy as much of the origin slice at once as possible (system word size), e.g. Vec::append. (still linear time, but on 64-bit systems this is 64 times faster than a 1-by-1 copy.)

Implementations on Foreign Types§

source§

impl<T: Copy> AppendCopy<T> for Vec<T>

source§

fn append_copy(&mut self, i: &[T])

source§

impl<T: Copy, A: Array<Item = T>> AppendCopy<T> for ArrayVec<A>

source§

fn append_copy(&mut self, i: &[T])

Implementors§