Trait dd_lib::io::ConvertSlice

source ·
pub trait ConvertSlice<T> {
    fn convert_slice(&self, buf: &mut [T]);

    fn convert_clone(&self, buf: &[T]) -> Vec<T>
    where
        T: Clone + Default
, { ... } fn convert_copy(&self, buf: &[T]) -> Vec<T>
    where
        T: Copy + Default
, { ... } }
Expand description

A convertslice can modify a slice of T in-place, and provides helper methods to create modified copies.

Required Methods

modify a slice of T in-place.

Provided Methods

modify a copy of T created using clone(). This is less efficient than convert_copy.

modify a copy of T. This is more efficient than convert_clone but has tighter bounds.

Implementors