pub trait RuntimeBootstrapPolicy {
type Error;
// Required methods
fn validate_allocation(
&self,
key: &StableKey,
slot: &MemoryManagerSlot,
) -> Result<(), Self::Error>;
fn runtime_bootstrap_identity(&self) -> PolicyIdentity;
// 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 the allocation check 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. Hosts derive the token from all effective configuration and prepare
any fallible policy setup before calling the runtime. Labels, versions and
hashing algorithms belong to the host; this crate compares the token bytes.
Required Associated Types§
Required Methods§
Sourcefn validate_allocation(
&self,
key: &StableKey,
slot: &MemoryManagerSlot,
) -> Result<(), Self::Error>
fn validate_allocation( &self, key: &StableKey, slot: &MemoryManagerSlot, ) -> Result<(), Self::Error>
Validate one resolved stable-key and allocation-slot claim. The runtime checks host grants and pool eligibility before this callback; historical ownership checks follow it. Governance bypasses this callback.
Sourcefn runtime_bootstrap_identity(&self) -> PolicyIdentity
fn runtime_bootstrap_identity(&self) -> PolicyIdentity
Return the host-issued token for this prepared 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".