[][src]Function minlambda::run

pub fn run<F, D, S, E>(handler: F) -> ! where
    F: FnMut(D) -> Result<S, E>,
    D: DeserializeOwned,
    S: Serialize,
    E: Display + 'static, 

Retrieves invocation events, calls your handler, and sends back response data within the Lambda execution environment.

This function does not return (Lambda will kill processes when unused).

Panics

This function panics on two fatal error conditions:

  • Failing to parse the AWS_LAMBDA_RUNTIME_API environment variable as a SocketAddr.
  • Failing to report an error to the runtime interface.