Skip to main content

CopyFromSliceUnchecked

Trait CopyFromSliceUnchecked 

Source
pub trait CopyFromSliceUnchecked<T> {
    // Required method
    unsafe fn copy_from_slice_unchecked(&mut self, src: &[T]);
}
Expand description

A trait for copy_from_slice without the length check.

Required Methods§

Source

unsafe fn copy_from_slice_unchecked(&mut self, src: &[T])

Copies all elements from src into self without the length check.

§Safety

The length of self must be equal to the length of src.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Copy> CopyFromSliceUnchecked<T> for [T]

Source§

unsafe fn copy_from_slice_unchecked(&mut self, src: &[T])

Self::copy_from_slice without the length check.

§Safety

self.len() must be == src.len().

Implementors§