MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / http

Method http

src/commands/run.rs:1541–1549  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1539#[cfg(feature = "wasi-http")]
1540impl wasmtime_wasi_http::p2::WasiHttpView for Host {
1541 fn http(&mut self) -> wasmtime_wasi_http::p2::WasiHttpCtxView<'_> {
1542 let ctx = self.wasi_http.as_mut().unwrap();
1543 let ctx = Arc::get_mut(ctx).expect("wasmtime_wasi_http is not compatible with threads");
1544 wasmtime_wasi_http::p2::WasiHttpCtxView {
1545 table: WasiView::ctx(unwrap_singlethread_context(&mut self.wasip1_ctx)).table,
1546 ctx,
1547 hooks: &mut self.wasi_http_hooks,
1548 }
1549 }
1550}
1551
1552#[cfg(all(feature = "wasi-http", feature = "component-model-async"))]

Callers

nothing calls this directly

Calls 5

get_mutFunction · 0.85
unwrapMethod · 0.45
as_mutMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected