Replies: 2 comments
-
Yes, See this example that shares custom resources: https://github.com/awslabs/aws-lambda-rust-runtime/blob/main/lambda-http/examples/shared-resources-example.rs Your current code is bumping into Rust borrowing challenges. There is a good explanation on how it works here: https://blog.logrocket.com/introducing-the-rust-borrow-checker/ |
Beta Was this translation helpful? Give feedback.
0 replies
-
@calavera Thank you. I also had to bump up package version as I was using 0.3. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create custom context that gets reused between invocations.
Here specifically trying to reuse mongodb client.
Getting: Closure may outlive the current function, but it borrows
custom_context
, which is owned by the current functionCan
handler_fn
be used to support something like this?Beta Was this translation helpful? Give feedback.
All reactions