Skip to main content

SliceExt

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§