Skip to main content

Activation

Trait Activation 

Source
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§

Source

fn namespace(&self) -> &str

Source

fn version(&self) -> &str

Source

fn methods(&self) -> Vec<&str>

Source

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,

Source

fn into_rpc_methods(self) -> Methods
where Self: Sized,

Provided Methods§

Source

fn description(&self) -> &str

Short description (max 15 words)

Source

fn long_description(&self) -> Option<&str>

Long description (optional, for detailed documentation)

Source

fn method_help(&self, _method: &str) -> Option<String>

Source

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)

Source

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,

Source

fn plugin_schema(&self) -> PluginSchema

Return this activation’s schema (methods + optional children)

Implementors§

Source§

impl Activation for Discord

Source§

type Methods = DiscordMethod

Source§

impl Activation for Email

Source§

type Methods = EmailMethod

Source§

impl Activation for Push

Source§

type Methods = PushMethod

Source§

impl Activation for Slack

Source§

type Methods = SlackMethod

Source§

impl Activation for Sms

Source§

type Methods = SmsMethod

Source§

impl Activation for Telegram

Source§

type Methods = TelegramMethod

Source§

impl Activation for Whatsapp

Source§

type Methods = WhatsappMethod

Source§

impl Activation for Echo

Source§

type Methods = EchoMethod

Source§

impl Activation for Health

Activation trait implementation - unified interface for Plexus

Source§

impl Activation for DynamicHub