shared_framework/doc/
assets.rs1pub const FS_DIR: &str = "doc/static";
14
15pub fn lookup(name: &str) -> Option<(&'static str, &'static [u8])> {
21 let name = name.trim_start_matches('/');
22 let key = if name.is_empty() { "index.html" } else { name };
23 match key {
24 "index.html" => Some(("text/html", include_bytes!("static/index.html"))),
25 "index.css" => Some(("text/css", include_bytes!("static/index.css"))),
26 "swagger-ui.css" => Some(("text/css", include_bytes!("static/swagger-ui.css"))),
27 "swagger-ui.js" => Some(("application/javascript", include_bytes!("static/swagger-ui.js"))),
28 "swagger-ui-bundle.js" => {
29 Some(("application/javascript", include_bytes!("static/swagger-ui-bundle.js")))
30 }
31 "swagger-ui-standalone-preset.js" => Some((
32 "application/javascript",
33 include_bytes!("static/swagger-ui-standalone-preset.js"),
34 )),
35 "swagger-ui-es-bundle.js" => Some((
36 "application/javascript",
37 include_bytes!("static/swagger-ui-es-bundle.js"),
38 )),
39 "swagger-ui-es-bundle-core.js" => Some((
40 "application/javascript",
41 include_bytes!("static/swagger-ui-es-bundle-core.js"),
42 )),
43 "swagger-initializer.js" => Some((
44 "application/javascript",
45 include_bytes!("static/swagger-initializer.js"),
46 )),
47 "oauth2-redirect.html" => {
48 Some(("text/html", include_bytes!("static/oauth2-redirect.html")))
49 }
50 "oauth2-redirect.js" => Some((
51 "application/javascript",
52 include_bytes!("static/oauth2-redirect.js"),
53 )),
54 "favicon-16x16.png" => {
55 Some(("image/png", include_bytes!("static/favicon-16x16.png")))
56 }
57 "favicon-32x32.png" => {
58 Some(("image/png", include_bytes!("static/favicon-32x32.png")))
59 }
60 _ => None,
61 }
62}