use std::path::{Path, PathBuf}; use rocket::response::NamedFile; #[get("/", rank = 5)] fn all(path: PathBuf) -> Option { NamedFile::open(Path::new("static/").join(path)).ok() }