Trait kernel::utilities::copy_slice::CopyOrErr

source ·
pub trait CopyOrErr {
    // Required method
    fn copy_from_slice_or_err(&mut self, src: &Self) -> Result<(), ErrorCode>;
}
Expand description

Interface for copying buffers that cannot panic.

Required Methods§

source

fn copy_from_slice_or_err(&mut self, src: &Self) -> Result<(), ErrorCode>

Copy a non-overlapping slice from src to self.

This is a non-panicking version of slice::copy_from_slice.

Returns Err(ErrorCode) if src and self are not the same length.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl CopyOrErr for [u8]

source§

impl CopyOrErr for [u16]

source§

impl CopyOrErr for [u32]

source§

impl CopyOrErr for [u64]

source§

impl CopyOrErr for [usize]

Implementors§