MCPcopy Index your code
hub / github.com/aws/aws-lambda-rust-runtime / boxed

Function boxed

lambda-runtime-api-client/src/body/mod.rs:31–37  ·  view source on GitHub ↗
(body: B)

Source from the content-addressed store, hash-verified

29type BoxBody = http_body_util::combinators::UnsyncBoxBody<Bytes, Error>;
30
31fn boxed<B>(body: B) -> BoxBody
32where
33 B: http_body::Body<Data = Bytes> + Send + 'static,
34 B::Error: Into<BoxError>,
35{
36 try_downcast(body).unwrap_or_else(|body| body.map_err(Error::new).boxed_unsync())
37}
38
39pub(crate) fn try_downcast<T, K>(k: K) -> Result<T, K>
40where

Callers 4

newMethod · 0.85
validateMethod · 0.85
registerMethod · 0.85
registerFunction · 0.85

Calls 1

try_downcastFunction · 0.85

Tested by

no test coverage detected