MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / cp_from_slice

Method cp_from_slice

src/vol.rs:202–212  ·  view source on GitHub ↗

Use volatile memory to copy elements from src into self:

(&mut self, src: &[T])

Source from the content-addressed store, hash-verified

200
201 // Use volatile memory to copy elements from src into self:
202 pub fn cp_from_slice(&mut self, src: &[T])
203 where
204 T: Copy,
205 R: DerefMut,
206 {
207 assert_eq!(self.reference.len(), src.len(), "DEST/SRC SLICES HAVE DIFFERING LENGTHS");
208 unsafe
209 {
210 intrinsics::volatile_copy_nonoverlapping_memory(self.reference.as_mut_ptr(), src.as_ptr(), self.reference.len());
211 }
212 }
213
214 // Use volatile memmove to copy elements from one part of slice to another part:
215 pub fn cpinternal(&mut self, src: impl RangeBounds<usize>, dest: usize)

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected