pub trait SimulationPlugin {
// Required methods
fn name(&self) -> &str;
fn version(&self) -> &str;
fn semantic_hash(&self) -> &str;
fn register(
&self,
registrar: &mut PluginRegistrar<'_>,
) -> Result<(), CanwuError>;
// Provided method
fn validate_activation(
&self,
_records: &[DomainRecord],
) -> Result<(), CanwuError> { ... }
}Expand description
A stateless executable package whose persisted identity must change whenever its authoritative behavior changes.
Required Methods§
fn name(&self) -> &str
Sourcefn semantic_hash(&self) -> &str
fn semantic_hash(&self) -> &str
Returns a lowercase 64-character author-controlled semantic hash.
This must change when handler behavior changes even if the serialized registration descriptor remains structurally identical.
fn register( &self, registrar: &mut PluginRegistrar<'_>, ) -> Result<(), CanwuError>
Provided Methods§
Sourcefn validate_activation(
&self,
_records: &[DomainRecord],
) -> Result<(), CanwuError>
fn validate_activation( &self, _records: &[DomainRecord], ) -> Result<(), CanwuError>
Validates plugin-owned records before the plugin becomes executable.
This hook runs after record-schema validation during both initial registration and snapshot rehydration. The kernel supplies only records owned by this plugin; implementations must not mutate external state.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".