Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wasi-http/src/p3/host/handler.rs
1693 views
1
use crate::p3::bindings::http::handler::{Host, HostWithStore};
2
use crate::p3::bindings::http::types::{ErrorCode, Request, Response};
3
use crate::p3::{WasiHttp, WasiHttpCtxView};
4
use anyhow::bail;
5
use wasmtime::component::{Accessor, Resource};
6
7
impl HostWithStore for WasiHttp {
8
async fn handle<U>(
9
store: &Accessor<U, Self>,
10
request: Resource<Request>,
11
) -> wasmtime::Result<Result<Resource<Response>, ErrorCode>> {
12
bail!("TODO")
13
}
14
}
15
16
impl Host for WasiHttpCtxView<'_> {}
17
18