pub trait SynthPlugin: NativePlugin { }Expand description
Marker trait: a plugin that runs in the pre-booking synth pass.
Synth plugins inject directives the Early validator depends on —
e.g. auto_accounts injects Open directives so account-
presence checks (E1001) see accounts that user code references
without explicitly opening. They run BEFORE booking and BEFORE
validation.
Implement this trait (in addition to NativePlugin) for any
plugin that synthesizes directives. The registry’s
NativePluginRegistry::find_synth lookup only returns plugins
implementing this marker; a regular plugin can’t accidentally
be invoked in the synth pass.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl SynthPlugin for AutoAccountsPlugin
Synthesizes Open directives the early validator needs to see —
must run pre-booking to suppress spurious E1001 errors on accounts
the plugin will auto-create.
impl SynthPlugin for DocumentDiscoveryPlugin
Synthesizes Document directives that downstream consumers expect
alongside user-written ones — runs in the synth pass so the early
validator sees them.