MCPcopy Create free account
hub / github.com/aws/aws-lambda-rust-runtime / adapter_is_boxable

Function adapter_is_boxable

lambda-http/src/lib.rs:322–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320 /// the `LambdaEvent` is converted into a `Request`.
321 #[test]
322 fn adapter_is_boxable() {
323 let _service: BoxService<LambdaEvent<LambdaRequest>, LambdaResponse, http::Error> = ServiceBuilder::new()
324 .layer_fn(|service| {
325 // This could be any middleware that logs, inspects, or manipulates
326 // the `LambdaEvent` before it's converted to a `Request` by `Adapter`.
327
328 LogService { inner: service }
329 })
330 .layer_fn(Adapter::from)
331 .service_fn(|_event: Request| async move { Response::builder().status(StatusCode::OK).body(Body::Empty) })
332 .boxed();
333 }
334}

Callers

nothing calls this directly

Calls 1

boxedMethod · 0.80

Tested by

no test coverage detected