Skip to main content

FunctionRegistry

Trait FunctionRegistry 

Source
pub trait FunctionRegistry:
    Send
    + Sync
    + 'static {
    // Required methods
    fn function_name(&self) -> &'static str;
    fn register(&self, server: &mut FunctionServer);

    // Provided method
    fn function_path(&self) -> &'static str { ... }
}
Expand description

Unified trait for registering serverless functions.

Implementations should register themselves with the appropriate server type.

Required Methods§

Source

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

Returns the function name.

Source

fn register(&self, server: &mut FunctionServer)

Registers the function handler with the server.

Provided Methods§

Source

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

Returns the function path (for HTTP routing).

Trait Implementations§

Source§

impl Collect for &'static dyn FunctionRegistry

Implementors§