Trait Funcktion

Source
pub trait Funcktion:
    Any
    + Send
    + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn _call_internal(&self, req: Request) -> Result<Response, CallError>;
}
Expand description

The Funcktion trait must be implemented by any cloud functions to be loaded in the system.

This trait is usually implemented via the mandatory export macro. If you decide to implement this yourself, beware since the _call_internal method will be called by the server through FFI. This means that _call_internal MUST handle all unwinding panics to avoid undefined behavior.

Required Methods§

Source

fn name(&self) -> &'static str

Returns the name of the funcktion.

Source

fn _call_internal(&self, req: Request) -> Result<Response, CallError>

Generated wrapper that executes a funcktion, catching any panics that occur.

Implementors§