PluginHandler

Trait PluginHandler 

Source
pub trait PluginHandler: Sized {
    type RecipientV1: RecipientPluginV1;
    type IdentityV1: IdentityPluginV1;

    // Provided methods
    fn recipient_v1(self) -> Result<Self::RecipientV1> { ... }
    fn identity_v1(self) -> Result<Self::IdentityV1> { ... }
}
Expand description

The interfaces that age implementations will use to interact with an age plugin.

This trait exists to encapsulate the set of arguments to run_state_machine that different plugins may want to provide.

§How to implement this trait

§Full plugins

  • Set all associated types to your plugin’s implementations.
  • Override all default methods of the trait.

§Recipient-only plugins

§Identity-only plugins

Required Associated Types§

Source

type RecipientV1: RecipientPluginV1

The plugin’s recipient-v1 implementation.

Source

type IdentityV1: IdentityPluginV1

The plugin’s identity-v1 implementation.

Provided Methods§

Source

fn recipient_v1(self) -> Result<Self::RecipientV1>

Returns an instance of the plugin’s recipient-v1 implementation.

Source

fn identity_v1(self) -> Result<Self::IdentityV1>

Returns an instance of the plugin’s identity-v1 implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§