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