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§
Sourcefn copy_from_slice_or_err(&mut self, src: &Self) -> Result<(), ErrorCode>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.