[][src]Trait funck::Funcktion

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

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

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

Returns the name of the funcktion.

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

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

Loading content...

Implementors

Loading content...