Trait Plugin
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub trait Plugin:
Send
+ Sync
+ 'static {
// Required methods
fn plugin_kind(&self) -> &str;
fn register<'a>(
&'a self,
config: &'a Map<String, Json>,
ctx: &'a mut PluginContext<'_>,
) -> PluginFuture<'a, ()>;
// Provided methods
fn allows_multiple_components(&self) -> bool { ... }
fn executor_config(&self) -> Option<NativeExecutorConfig> { ... }
fn executor_config_for_component(
&self,
config: &Map<String, Json>,
) -> Result<Option<NativeExecutorConfig>> { ... }
fn validate(&self, config: &Map<String, Json>) -> Vec<ConfigDiagnostic> { ... }
}
Required Methods
plugin_kind
fn plugin_kind(&self) -> &str
register
fn register<'a>(
&'a self,
config: &'a Map<String, Json>,
ctx: &'a mut PluginContext<'_>,
) -> PluginFuture<'a, ()>
Provided Methods
allows_multiple_components
fn allows_multiple_components(&self) -> bool
executor_config
fn executor_config(&self) -> Option<NativeExecutorConfig>
Opt into a shared plugin Tokio runtime; inline execution needs no runtime.
executor_config_for_component
fn executor_config_for_component(
&self,
config: &Map<String, Json>,
) -> Result<Option<NativeExecutorConfig>>
Resolve optional shared Tokio support from plugin defaults and component executor settings.
validate
fn validate(&self, config: &Map<String, Json>) -> Vec<ConfigDiagnostic>