[][src]Trait toodee::CopyOps

pub trait CopyOps<T>: TooDeeOpsMut<T> {
    fn copy_from_slice(&mut self, src: &[T])
    where
        T: Copy
, { ... }
fn clone_from_slice(&mut self, src: &[T])
    where
        T: Clone
, { ... }
fn copy_from_toodee(&mut self, src: &impl TooDeeOps<T>)
    where
        T: Copy
, { ... }
fn clone_from_toodee(&mut self, src: &impl TooDeeOps<T>)
    where
        T: Clone
, { ... }
fn copy_within(&mut self, src: (Coordinate, Coordinate), dest: Coordinate)
    where
        T: Copy
, { ... } }

Provides basic copying operations for TooDee structures.

Provided methods

fn copy_from_slice(&mut self, src: &[T]) where
    T: Copy

Copies data from another slice into this area. The source slice's length must match the size of this object's area. Data is copied row by row.

fn clone_from_slice(&mut self, src: &[T]) where
    T: Clone

Clones data from another slice into this area. The source slice's length must match the size of this object's area. Data is cloned row by row.

fn copy_from_toodee(&mut self, src: &impl TooDeeOps<T>) where
    T: Copy

Copies data from another TooDeeOps object into this one. The source and destination dimensions must match.

fn clone_from_toodee(&mut self, src: &impl TooDeeOps<T>) where
    T: Clone

Copies data from another TooDeeOps object into this one. The source and destination dimensions must match.

fn copy_within(&mut self, src: (Coordinate, Coordinate), dest: Coordinate) where
    T: Copy

Copies the src area (top-left to bottom-right) to a destination area. dest specifies the top-left position of destination area. The src area will be partially overwritten if the regions overlap.

Panics

Panics if:

  • src dimensions are outside the array's bounds
  • there's insufficient room to copy all of src to dest
Loading content...

Implementors

impl<'_, T> CopyOps<T> for TooDeeViewMut<'_, T>[src]

impl<T> CopyOps<T> for TooDee<T>[src]

Loading content...