static_file_resolver/struct.rs
1use super::*;
2
3/// The rules that decide which file a request is answered with.
4///
5/// The resolver holds no server state, so the same rules can be used by any
6/// server that serves the files of a directory.
7#[derive(Clone, Copy, Debug, Getter)]
8pub struct StaticFileResolver<'a> {
9 /// The directory the files are served from.
10 #[get(type(copy))]
11 pub root: &'a Path,
12 /// The file that answers a request for a directory.
13 #[get(type(copy))]
14 pub index: &'a str,
15}