A library that resolves the file a request asks for under a root directory. It refuses a path that climbs out of the root, so a request cannot reach a file the root does not hold.
usesuper::*;/// The rules that decide which file a request is answered with.
////// The resolver holds no server state, so the same rules can be used by any
/// server that serves the files of a directory.
#[derive(Clone, Copy, Debug, Getter)]pubstructStaticFileResolver<'a>{/// The directory the files are served from.
#[get(type(copy))]pubroot:&'a Path,
/// The file that answers a request for a directory.
#[get(type(copy))]pubindex:&'astr,
}