[−][src]Trait smallvec::ExtendFromSlice
Trait to be implemented by a collection that can be extended from a slice
Example
use smallvec::{ExtendFromSlice, SmallVec}; fn initialize<V: ExtendFromSlice<u8>>(v: &mut V) { v.extend_from_slice(b"Test!"); } let mut vec = Vec::new(); initialize(&mut vec); assert_eq!(&vec, b"Test!"); let mut small_vec = SmallVec::<[u8; 8]>::new(); initialize(&mut small_vec); assert_eq!(&small_vec as &[_], b"Test!");
Required methods
fn extend_from_slice(&mut self, other: &[T])
Extends a collection from a slice of its element type
Implementations on Foreign Types
impl<T: Clone> ExtendFromSlice<T> for Vec<T>
[src]
fn extend_from_slice(&mut self, other: &[T])
[src]
Implementors
impl<A: Array> ExtendFromSlice<<A as Array>::Item> for SmallVec<A> where
A::Item: Copy,
[src]
A::Item: Copy,