Skip to main content

read_file_vec

Function read_file_vec 

Source
pub fn read_file_vec(path: &Path) -> Result<Vec<u8>>
Expand description

Read a file entirely into a mutable Vec. Uses exact-size allocation from fstat + single read() for efficiency. Preferred over mmap when the caller needs mutable access (e.g., in-place decode).