MCPcopy Create free account
hub / github.com/PerroEngine/Perro / write_flat

Method write_flat

perro_source/core/perro_structs/src/structs/matrix/mod.rs:978–988  ·  view source on GitHub ↗
(&self, out: &mut [T])

Source from the content-addressed store, hash-verified

976
977 #[inline]
978 pub fn write_flat(&self, out: &mut [T]) -> Option<usize>
979 where
980 T: Copy,
981 {
982 let len = Self::flat_len();
983 if out.len() < len {
984 return None;
985 }
986 out[..len].copy_from_slice(self.as_slice());
987 Some(len)
988 }
989
990 #[inline]
991 pub fn col(&self, col: usize) -> [T; ROWS]

Callers 1

copy_to_sliceMethod · 0.80

Calls 3

copy_from_sliceMethod · 0.80
lenMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected