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

Method cp_into_slice

src/vol.rs:190–199  ·  view source on GitHub ↗

Use volatile memory to copy elements from self into dst:

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

Source from the content-addressed store, hash-verified

188
189 // Use volatile memory to copy elements from self into dst:
190 pub fn cp_into_slice(&self, dst: &mut [T])
191 where
192 T: Copy,
193 {
194 assert_eq!(self.reference.len(), dst.len(), "DEST/SRC SLICES HAVE DIFFERING LENGTHS");
195 unsafe
196 {
197 intrinsics::volatile_copy_nonoverlapping_memory(dst.as_mut_ptr(), self.reference.as_ptr(), self.reference.len());
198 }
199 }
200
201 // Use volatile memory to copy elements from src into self:
202 pub fn cp_from_slice(&mut self, src: &[T])

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected