pub fn load_input_by_field(
    buf: &mut [u8],
    offset: usize,
    index: usize,
    source: Source,
    field: InputField
) -> Result<usize, SysError>
Available on non-crate feature simulator only.
Expand description

Load input by field

Return the loaded data length or a syscall error

Arguments

  • buf - a writable buf used to receive the data
  • offset - offset
  • index - index
  • source - source
  • field - field

Example

let mut buf = [0u8; 8];
let len = load_input_by_field(&mut buf, 0, index, source, InputField::Since)?;
debug_assert_eq!(len, buf.len());