hyperlane-plugin-static-files 22.0.6

A static file plugin for the Hyperlane framework, serving the files of a directory with the content type of the framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;

/// The configuration of the static file plugin.
#[derive(Clone, Debug, Getter)]
pub struct StaticFilesConfig {
    /// The directory the files are served from.
    pub root: PathBuf,
    /// The file that answers a request for a directory.
    pub index: String,
}

/// The plugin that serves the files of a directory.
#[derive(Clone, Copy, Debug, Default)]
pub struct StaticFilesPlugin;

/// The route that serves the files of the configured directory.
#[derive(Clone, Copy, Debug, Default)]
pub struct StaticFilesRoute;