mirror of
https://github.com/YGGverse/nexy.git
synced 2026-03-31 09:15:28 +00:00
26 lines
514 B
Rust
26 lines
514 B
Rust
use std::path::PathBuf;
|
|
|
|
/// Internal server response types
|
|
pub enum Response<'a> {
|
|
AccessDenied {
|
|
canonical: PathBuf,
|
|
path: PathBuf,
|
|
query: &'a str,
|
|
},
|
|
InternalServerError {
|
|
message: String,
|
|
path: Option<PathBuf>,
|
|
query: Option<&'a str>,
|
|
},
|
|
NotFound {
|
|
message: String,
|
|
path: PathBuf,
|
|
query: &'a str,
|
|
},
|
|
File(&'a [u8]),
|
|
Directory {
|
|
data: String,
|
|
is_root: bool,
|
|
query: &'a str,
|
|
},
|
|
}
|