Trait SliceExt

Source
pub trait SliceExt<T> {
    // Required methods
    fn copy_from(&mut self, src: &[T]) -> usize
       where T: Copy;
    fn copy_inner(&mut self, src: usize, dst: usize, len: usize)
       where T: Copy;
}
Expand description

Extension methods for slices

Required Methods§

Source

fn copy_from(&mut self, src: &[T]) -> usize
where T: Copy,

Copies the less of self.len() and src.len() from src into self, returning the amount of items copied.

Source

fn copy_inner(&mut self, src: usize, dst: usize, len: usize)
where T: Copy,

Copies elements to another location within the slice, which may overlap.

Implementations on Foreign Types§

Source§

impl<T> SliceExt<T> for [T]

Source§

fn copy_from(&mut self, src: &[T]) -> usize
where T: Copy,

Source§

fn copy_inner(&mut self, src: usize, dst: usize, len: usize)
where T: Copy,

Implementors§