pub fn run_state_machine(
state_machine: &str,
handler: impl PluginHandler,
) -> Result<()>Expand description
Runs the plugin state machine defined by state_machine.
This should be triggered if the --age-plugin=state_machine flag is provided as an
argument when starting the plugin.
ยงPanics
The state machine will panic if the PluginHandler implementation violates any
MUST requirements of the age plugin specification. Examples include:
- Returning fewer stanzas from
RecipientPluginV1::wrap_file_keysthan the number of recipients and identities that were provided (instead of returning an error if any could not be encrypted to).- Note that this currently prohibits plugins from automatically deduplicating provided recipients and identities; either duplicate stanzas must be produced, or an error returned. This prohibition might be lifted in a future release.