pub trait Files {
// Required methods
fn bytes(&self, path: &str) -> Option<Vec<u8>>;
fn list(&self, path: &str) -> Option<Vec<String>>;
// Provided methods
fn read(&self, path: &str) -> Option<String> { ... }
fn image(&self, path: &str) -> Option<Result<Arc<ImageFile>, String>> { ... }
fn font(&self, path: &str) -> Option<Result<Arc<FontFile>, String>> { ... }
}Expand description
Reads a design’s files by their path from the top of the served folder.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".