Skip to main content

Files

Trait Files 

Source
pub trait Files {
    // Required method
    fn read(&self, path: &str) -> Result<Vec<u8>, String>;
}

Required Methods§

Source

fn read(&self, path: &str) -> Result<Vec<u8>, String>

Reads the whole file at path.

§Errors

The file cannot be read. The message matches the Go CLI’s.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§