pub trait Activation:
Send
+ Sync
+ 'static {
type Methods: MethodEnumSchema;
// Required methods
fn namespace(&self) -> &str;
fn version(&self) -> &str;
fn methods(&self) -> Vec<&str>;
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn into_rpc_methods(self) -> Methods
where Self: Sized;
// Provided methods
fn description(&self) -> &str { ... }
fn long_description(&self) -> Option<&str> { ... }
fn method_help(&self, _method: &str) -> Option<String> { ... }
fn plugin_id(&self) -> Uuid { ... }
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
fn plugin_schema(&self) -> PluginSchema { ... }
}Required Associated Types§
Required Methods§
fn namespace(&self) -> &str
fn version(&self) -> &str
fn methods(&self) -> Vec<&str>
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn into_rpc_methods(self) -> Methodswhere
Self: Sized,
Provided Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Short description (max 15 words)
Sourcefn long_description(&self) -> Option<&str>
fn long_description(&self) -> Option<&str>
Long description (optional, for detailed documentation)
fn method_help(&self, _method: &str) -> Option<String>
Sourcefn plugin_id(&self) -> Uuid
fn plugin_id(&self) -> Uuid
Stable activation instance ID for handle routing By default generates a deterministic UUID from namespace+major_version Using major version only ensures handles survive minor/patch upgrades (semver)
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn plugin_schema(&self) -> PluginSchema
fn plugin_schema(&self) -> PluginSchema
Return this activation’s schema (methods + optional children)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl Activation for DynamicHub
impl Activation for DynamicHub
type Methods = DynamicHubMethod
Source§impl Activation for Health
Activation trait implementation - unified interface for Plexus
impl Activation for Health
Activation trait implementation - unified interface for Plexus