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, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: '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<PlexusStream, PlexusError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn static_child_schemas(&self) -> Vec<(String, PluginSchema)> { ... }
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, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: '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<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn static_child_schemas(&self) -> Vec<(String, PluginSchema)>
fn static_child_schemas(&self) -> Vec<(String, PluginSchema)>
MACRO-20: this activation’s static children and theirs, as
(path, schema) — the same list as
ChildRouter::router_static_child_schemas, reachable from the
hub’s type-erased registry (which holds Activations).
Default empty; #[plexus_macros::activation] emits it for an
activation with static #[plexus_macros::child]ren. A
DynamicHub indexes each child’s methods for its gate
(<activation>.<path>.<method>, the child’s own target), merges the
children’s roles(...) into DynamicHub::declared_roles, and lists
them in auth.requires and the caller’s view — every grant qualified
by the path (see super::children).
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 AuthActivation
impl Activation for AuthActivation
Source§impl Activation for DynamicHub
impl Activation for DynamicHub
type Methods = DynamicHubMethod
Source§impl Activation for EchoActivation
impl Activation for EchoActivation
Source§impl Activation for Health
Activation trait implementation - unified interface for Plexus
impl Activation for Health
Activation trait implementation - unified interface for Plexus