Trait SequentialFileRead

Source
pub trait SequentialFileRead {
    // Required method
    fn read(&mut self, n: usize, result: *mut Slice, scratch: *mut u8) -> Status;
}

Required Methods§

Source

fn read(&mut self, n: usize, result: *mut Slice, scratch: *mut u8) -> Status

| Read up to “n” bytes from the file. “scratch[0..n-1]” | may be written by this routine. Sets | “*result” to the data that was read (including | if fewer than “n” bytes were successfully | read). | | May set “*result” to point at data in | “scratch[0..n-1]”, so “scratch[0..n-1]” | must be live when “*result” is used. | | If an error was encountered, returns | a non-OK status. | | REQUIRES: External synchronization |

Implementors§