pub trait DirectoryListingConfig {
// Provided method
fn create_body(base: &Path, path: &Path, dir: ReadDir) -> Bytes { ... }
}
Expand description
Describes how to serve directory
Provided Methods§
Sourcefn create_body(base: &Path, path: &Path, dir: ReadDir) -> Bytes
fn create_body(base: &Path, path: &Path, dir: ReadDir) -> Bytes
Describes how to create HTML text for Directory listing
base
is root directory for file service.
path
is relative to base
path to directory.
dir
is result of fs::read_dir
Default implementation provides trivial HTML page with listing.
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.