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

Method layer

lambda-runtime/src/runtime.rs:150–161  ·  view source on GitHub ↗

Add a new layer to this runtime. For an incoming request, this layer will be executed before any layer that has been added prior. # Example ```no_run use lambda_runtime::{layers, Error, LambdaEvent, Runtime}; use serde_json::Value; use tower::service_fn; #[tokio::main] async fn main() -> Result<(), Error> { let runtime = Runtime::new(service_fn(echo)).layer( layers::TracingLayer::new() ); runtim

(self, layer: L)

Source from the content-addressed store, hash-verified

148 /// }
149 /// ```
150 pub fn layer<L>(self, layer: L) -> Runtime<L::Service>
151 where
152 L: Layer<S>,
153 L::Service: Service<LambdaInvocation, Response = (), Error = BoxError>,
154 {
155 Runtime {
156 client: self.client,
157 config: self.config,
158 service: layer.layer(self.service),
159 concurrency_limit: self.concurrency_limit,
160 }
161 }
162}
163
164#[cfg(feature = "concurrency-tokio")]

Callers 7

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
runFunction · 0.45
run_concurrentFunction · 0.45

Calls

no outgoing calls