[−][src]Function sys_util::read_struct_slice
pub unsafe fn read_struct_slice<T: Copy, F: Read>(
f: &mut F,
len: usize
) -> Result<Vec<T>, Error>
Reads an array of structs from an input buffer. Returns a Vec of structs initialized with data
from the specified input.
This is unsafe because the structs are initialized to unverified data read from the input.
read_struct_slice
should only be called for plain old data structs. It is not endian safe.
Arguments
f
- The input to read from. Often this is a file.len
- The number of structs to fill with data read fromf
.