Skip to main content

ModuleBinding

Trait ModuleBinding 

Source
pub trait ModuleBinding:
    Debug
    + Send
    + Sync {
    // Required methods
    fn register_functions(&self, registry: &mut FunctionRegistry);
    fn register_event_handlers(
        &self,
        registry: &mut EventHandlerRegistry,
        context: &EventHandlerRegistrationContext,
    );
}
Expand description

Narrow by design — pure data lives in crate::ModuleManifest, read directly by upper layers, never through this trait.

HTTP routing is deliberately EXCLUDED from this cross-source trait: it carries utoipa OpenApiRouter types that out-of-process/Wasm sources cannot produce. Linked modules can still carry source-specific HTTP behavior on crate::LinkedBinding.

Required Methods§

Source

fn register_functions(&self, registry: &mut FunctionRegistry)

Register this module’s runtime functions into the shared registry.

Source

fn register_event_handlers( &self, registry: &mut EventHandlerRegistry, context: &EventHandlerRegistrationContext, )

Register this module’s in-process event handlers.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§