Skip to main content

dispatch_controller

Function dispatch_controller 

Source
pub async fn dispatch_controller(
    name: &str,
    resource: &str,
    ctx: &mut Context,
    controllers: Option<&ControllerMap>,
    wasm_runtime: Option<&WasmRuntime>,
) -> ControllerResult
Expand description

Dispatches a controller call, handling both Rust and WASM controllers.

If name starts with wasm:, delegates to the WASM runtime. Otherwise, looks up and calls a registered Rust controller function.