pub trait SendFunctionRuntime: Send + Sync {
// Required methods
fn invoke_raw<'life0, 'life1, 'async_trait>(
&'life0 self,
module: &'life1 FunctionModule,
event: EventPayload,
limits: ResourceLimits,
) -> Pin<Box<dyn Future<Output = Result<FunctionResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn supported_extensions(&self) -> &[&str];
fn supports_hot_reload(&self) -> bool;
fn name(&self) -> &str;
}Expand description
Object-safe variant of FunctionRuntime for dynamic dispatch.
This trait has the same semantic methods but without generic parameters,
making it suitable for Arc<dyn SendFunctionRuntime>. The invoke_raw
method uses a NoopHostContext internally.
Required Methods§
Sourcefn invoke_raw<'life0, 'life1, 'async_trait>(
&'life0 self,
module: &'life1 FunctionModule,
event: EventPayload,
limits: ResourceLimits,
) -> Pin<Box<dyn Future<Output = Result<FunctionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invoke_raw<'life0, 'life1, 'async_trait>(
&'life0 self,
module: &'life1 FunctionModule,
event: EventPayload,
limits: ResourceLimits,
) -> Pin<Box<dyn Future<Output = Result<FunctionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a function module with the given event and resource limits.
Uses NoopHostContext — callers that need
host-bridge functionality should use FunctionRuntime::invoke with
a concrete host context instead.
§Errors
Returns Err if the module cannot be loaded, or execution fails.
Sourcefn supported_extensions(&self) -> &[&str]
fn supported_extensions(&self) -> &[&str]
Get the list of file extensions this runtime supports.
Sourcefn supports_hot_reload(&self) -> bool
fn supports_hot_reload(&self) -> bool
Check if this runtime supports hot-reloading modules without restart.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".