Trait toad_common::array::AppendCopy
source · [−]pub trait AppendCopy<T: Copy> {
fn append_copy<'a>(&mut self, i: &[T]);
}Expand description
Collections that support extending themselves mutably from copyable slices
Required Methods
sourcefn append_copy<'a>(&mut self, i: &[T])
fn append_copy<'a>(&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.)