MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / serve_static

Function serve_static

packages/server/src/static_files/mod.rs:6–13  ·  view source on GitHub ↗
(
    root: PathBuf,
    method: Method,
    uri: Uri,
    access_token: Option<String>,
)

Source from the content-addressed store, hash-verified

4use std::path::{Component, Path, PathBuf};
5
6pub async fn serve_static(
7 root: PathBuf,
8 method: Method,
9 uri: Uri,
10 access_token: Option<String>,
11) -> Result<Response<Body>, StatusCode> {
12 serve_static_inner(root, None, true, method, uri, access_token).await
13}
14
15pub async fn serve_static_under(
16 root: PathBuf,

Callers 1

app_routerFunction · 0.85

Calls 1

serve_static_innerFunction · 0.85

Tested by

no test coverage detected