pub fn read_to_string_buffer(buffer: &mut String, path: &Path) -> Result<usize>Expand description
Read to pre-allocated String buffer.
Same as std::fs::read_to_string(), but doesn’t allocate if it
doesn’t need to increase the buffer size (and bypasses the metadata
check for size-hint, since the buffer is supposed to be big enough).
§Errors
Errors if file cannot be read.