FileRead

Trait FileRead 

Source
pub trait FileRead: AsRef<Path> + Sized {
    // Provided method
    fn read_open(self) -> Result<(Metadata, BufReader<File>)> { ... }
}

Provided Methods§

Source

fn read_open(self) -> Result<(Metadata, BufReader<File>)>

Opens a file and returns a buffered reader and the file’s metadata. A more memory efficient alternative to fs::read_to_string(self)?.into_cursor().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: AsRef<Path>> FileRead for T