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§
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.