pub trait Function<'a, InputType: Deserialize<'a>, OutputType: Serialize> {
// Required method
fn execute(&self, input: InputType) -> Result<Box<OutputType>, Box<Error>>;
}
Expand description
The Function trait is the interface for runnable functions on Punch FaaS.
§Arguments
'a
- lifetime parameter for serde::DeserializeInputType
- input type. It implements the trait serde::DeserializeOutputType
- output type. It implements the trait serde::Serialize