pub trait RuntimeBootstrapPolicy {
type Error;
// Required methods
fn validate_key(&self, key: &StableKey) -> Result<(), Self::Error>;
fn validate_slot(
&self,
key: &StableKey,
slot: &MemoryManagerSlot,
) -> Result<(), Self::Error>;
fn runtime_bootstrap_identity(
&self,
) -> Result<PolicyIdentity, PolicyIdentityError>;
// Provided method
fn prepare_bootstrap(
&self,
_admission: &mut BootstrapAdmission<'_>,
) -> Result<(), Self::Error> { ... }
}Expand description
RuntimeBootstrapPolicy
Host policy for recovered admission, allocation checks and runtime identity.
The runtime admits host grants and pool eligibility before calling key and slot checks, in that order, for each external declaration. Governance stays private; historical ownership checks still apply to every declaration.
crate::MemoryRuntime binds its successful bootstrap to this identity.
Repeated bootstrap is idempotent only when the caller supplies the same
sealed declaration snapshot and the same policy identity. Implementations
should change the identity whenever policy configuration or semantics
change. Configuration-dependent policies should include a digest derived
from their effective configuration.
Required Associated Types§
Required Methods§
Sourcefn validate_key(&self, key: &StableKey) -> Result<(), Self::Error>
fn validate_key(&self, key: &StableKey) -> Result<(), Self::Error>
Validate a stable key against framework naming rules.
Sourcefn validate_slot(
&self,
key: &StableKey,
slot: &MemoryManagerSlot,
) -> Result<(), Self::Error>
fn validate_slot( &self, key: &StableKey, slot: &MemoryManagerSlot, ) -> Result<(), Self::Error>
Validate a stable-key to allocation-slot claim. The slot already contains a usable ID; policy checks ownership and scope.
Sourcefn runtime_bootstrap_identity(
&self,
) -> Result<PolicyIdentity, PolicyIdentityError>
fn runtime_bootstrap_identity( &self, ) -> Result<PolicyIdentity, PolicyIdentityError>
Construct the bounded semantic identity of this policy configuration.
Provided Methods§
Sourcefn prepare_bootstrap(
&self,
_admission: &mut BootstrapAdmission<'_>,
) -> Result<(), Self::Error>
fn prepare_bootstrap( &self, _admission: &mut BootstrapAdmission<'_>, ) -> Result<(), Self::Error>
Admit recovered identity and complete declarations before resolution.
Runs once per cold bootstrap attempt after validated recovery. Warm bootstrap/adoption does not replay it. The default selects no historical keys. Hosts compose generated consumers here under their existing policy and bucket profile. Include these semantics in the policy identity.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".