Archived
3
0

Create build system (#1)

This commit is contained in:
Matěj Žucha
2025-03-09 18:22:14 +00:00
committed by Ondřej Mekina
parent 5bb655b7de
commit 77c8deabc8
36 changed files with 1860 additions and 478 deletions

20
src/mime_types.rs Normal file
View File

@@ -0,0 +1,20 @@
macro_rules! mimes {
($($ident: ident = $value: literal),*$(,)?) => {
pub enum MimeType {
$($ident),*
}
impl MimeType {
pub fn text(&self) -> &'static str {
match self { $(Self::$ident => $value),* }
}
}
};
}
mimes! {
Txt = "text/plain",
Html = "text/html",
Css = "text/css",
Js = "text/javascript",
}