ReadFromFile

Trait ReadFromFile 

Source
pub trait ReadFromFile {
    // Required method
    fn read_from_file(path: &Path) -> Self;
}
Expand description

Used internally.

Only used by the dynamic versions of Resource to make it generic over both strings and bytes. Represents something that can be read straight from a file.

Required Methods§

Source

fn read_from_file(path: &Path) -> Self

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.

Implementations on Foreign Types§

Source§

impl ReadFromFile for String

Source§

impl ReadFromFile for Vec<u8>

Implementors§