DoubleSliceCopy

Trait DoubleSliceCopy 

Source
pub trait DoubleSliceCopy<'a, T: 'a> {
    // Required method
    fn copy_into_slice(&self, target: &mut [T]) -> RxDone
       where T: Copy;
}
Expand description

Trait for copying data from a pair of slices into a single target slice.

This trait defines a method to efficiently copy data from two source slices into a mutable target slice, typically used in batch operations within a steady-state system.

Required Methods§

Source

fn copy_into_slice(&self, target: &mut [T]) -> RxDone
where T: Copy,

Copies data from the pair of slices into the provided target slice.

This method fills the target slice with as many elements as possible from the two source slices, returning the number of items copied. It is designed for efficient data transfer and requires the type T to be copyable.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a> DoubleSliceCopy<'a, T> for (&'a [T], &'a [T])

Implementation of DoubleSliceCopy for a pair of slices.

This implementation handles copying from two source slices into a single target slice, ensuring the target is filled to its capacity or until the source data is exhausted.

Source§

fn copy_into_slice(&self, target: &mut [T]) -> RxDone
where T: Copy,

Implementors§