Home
last modified time | relevance | path

Searched refs:trailers (Results 1 – 13 of 13) sorted by relevance

/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dp3_http_middleware.rs71 let (mut body, trailers) = Request::consume_body(request, result_rx); in handle()
73 let (body, trailers) = if content_deflated { in handle()
100 trailers_tx.write(trailers.await).await.unwrap(); in handle()
105 (body, trailers) in handle()
113 trailers, in handle()
133 let (mut body, trailers) = Response::consume_body(response, result_rx); in handle()
134 let (body, trailers) = if accept_deflated { in handle()
164 trailers_tx.write(trailers.await).await.unwrap(); in handle()
169 (body, trailers) in handle()
175 Response::new(Headers::from_list(&headers).unwrap(), Some(body), trailers); in handle()
H A Dp3_http_echo.rs19 let (body, trailers) = Request::consume_body(request, result_rx); in handle()
27 Response::new(headers, Some(body), trailers) in handle()
52 trailers_tx.write(trailers.await).await.unwrap(); in handle()
H A Dp3_http_proxy.rs29 let (rx, trailers) = Request::consume_body(request, wit_future::new(|| Ok(())).1); in handle()
30 let outgoing_request = Request::new(Fields::new(), Some(rx), trailers, None).0; in handle()
H A Dp2_api_proxy_streaming.rs527 Inner::Trailers(trailers) => { in incoming_body()
528 match trailers.get() { in incoming_body()
529 Some(Ok(trailers)) => { in incoming_body()
531 match trailers { in incoming_body()
554 .push((trailers.subscribe(), context.waker().clone())); in incoming_body()
/wasmtime-44.0.1/crates/test-programs/src/p3/
H A Dhttp.rs12 pub trailers: Option<Vec<(String, Vec<u8>)>>, field
24 out.field("trailers", &self.trailers); in fmt()
111 let trailers = trailers_rx.await.context("failed to read body")?; in request() localVariable
112 let trailers = trailers.map(|trailers| trailers.copy_all()); in request() localVariable
117 trailers, in request()
/wasmtime-44.0.1/crates/wasi-http/src/p3/
H A Dbody.rs106 trailers: Some(trailers_tx), in consume()
366 Ok(Ok(Some(trailers))) => Poll::Ready(Some(Ok(http_body::Frame::trailers( in poll_frame()
428 Ok(Some(trailers)) => { in poll_consume()
430 let trailers = table in poll_consume() localVariable
431 .delete(trailers) in poll_consume()
433 Ok(Some(Arc::from(trailers))) in poll_consume()
458 if let Some(tx) = self.trailers.take() { in close()
531 Err(Ok(trailers)) => { in poll_produce()
533 let trailers = FieldMap::new_immutable(trailers); in poll_produce() localVariable
534 let trailers = view in poll_produce() localVariable
[all …]
/wasmtime-44.0.1/crates/wasi-http/src/p2/
H A Dbody.rs185 Err(trailers) => { in record_frame()
186 let trailers = trailers.into_trailers().unwrap(); in record_frame() localVariable
194 let _ = tx.send(StreamEnd::Trailers(Some(trailers))); in record_frame()
462 FinishMessage::Trailers(trailers) => { in new()
463 Poll::Ready(Some(Ok(Frame::trailers(trailers)))) in new()
507 pub fn finish(mut self, trailers: Option<FieldMap>) -> Result<(), types::ErrorCode> { in finish()
525 let message = if let Some(ts) = trailers { in finish()
H A Dtypes_impl.rs489 let trailers = self.table.get_mut(&id)?; in get() localVariable
490 match trailers { in get()
496 let res = match std::mem::replace(trailers, HostFutureTrailers::Consumed) { in get()
536 let trailers = self.table.push(body.into_future_trailers())?; in finish() localVariable
537 Ok(trailers) in finish()
/wasmtime-44.0.1/crates/wasi-http/wit/deps/
H A Dhttp.wit5 /// their headers, trailers, and bodies.
245 type trailers = fields;
447 /// an `input-stream` and the delivery of trailers as a `future-trailers`,
449 /// the body contents or waiting on trailers at any given time.
472 finish: static func(this: incoming-body) -> future-trailers;
478 /// trailers, this future will resolve to the empty set of trailers once the
481 resource future-trailers {
500 /// or not trailers were present in the body.
502 /// When some `trailers` are returned by this method, the `trailers`
505 /// dropped before the parent `future-trailers` is dropped.
[all …]
/wasmtime-44.0.1/crates/wasi-http/tests/all/p3/
H A Dmod.rs477 .send(Ok(http_body::Frame::trailers({ in test_http_echo()
478 let mut trailers = http::HeaderMap::new(); in test_http_echo() localVariable
480 trailers in test_http_echo()
484 trailers in test_http_echo()
512 let trailers = response.body().trailers().expect("trailers missing"); in test_http_echo() localVariable
514 trailers.get("fizz"), in test_http_echo()
/wasmtime-44.0.1/crates/wasi-http/src/p3/wit/deps/
H A Dhttp.wit4 /// Requests and Responses, as well as their headers, trailers, and bodies.
262 type trailers = fields;
274 /// Once it is closed, `trailers` future must resolve to a result.
275 /// If `trailers` resolves to an error, underlying connection
288 …tic func(headers: headers, contents: option<stream<u8>>, trailers: future<result<option<trailers>,…
343 … future<result<_, error-code>>) -> tuple<stream<u8>, future<result<option<trailers>, error-code>>>;
395 /// Once it is closed, `trailers` future must resolve to a result.
396 /// If `trailers` resolves to an error, underlying connection
400 …tic func(headers: headers, contents: option<stream<u8>>, trailers: future<result<option<trailers>,…
423 … future<result<_, error-code>>) -> tuple<stream<u8>, future<result<option<trailers>, error-code>>>;
/wasmtime-44.0.1/crates/wasi-http/src/p3/host/
H A Dtypes.rs314 trailers: FutureReader<Result<Option<Resource<Trailers>>, ErrorCode>>, in new()
327 trailers_rx: trailers, in new()
332 trailers_rx: trailers, in new()
597 trailers: FutureReader<Result<Option<Resource<Trailers>>, ErrorCode>>, in new()
609 trailers_rx: trailers, in new()
614 trailers_rx: trailers, in new()
/wasmtime-44.0.1/tests/all/
H A Dcli_tests.rs1656 assert!(body.trailers().is_none()); in send_request_with()