pub struct GenericAllocationPolicy;Expand description
GenericAllocationPolicy
Built-in bootstrap policy for hosts needing no additional application checks. The runtime enforces host namespace grants, the common pool and governance; this policy adds no application-specific restrictions. Passing it directly to allocation validation outside the runtime does not enforce host pool admission.
Use with configured bootstrap when the host does not require a custom policy. It retains the built-in policy identity and does not authorize replacing a different policy already bound to the runtime.
Trait Implementations§
Source§impl AllocationPolicy for GenericAllocationPolicy
impl AllocationPolicy for GenericAllocationPolicy
Source§fn 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.
Source§fn 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.
Source§fn validate_reserved_slot(
&self,
_key: &StableKey,
_slot: &MemoryManagerSlot,
) -> Result<(), Self::Error>
fn validate_reserved_slot( &self, _key: &StableKey, _slot: &MemoryManagerSlot, ) -> Result<(), Self::Error>
Validate a reserved stable-key to allocation-slot claim.
The checked slot does not establish permission to reserve that ID.
Source§impl RuntimeBootstrapPolicy for GenericAllocationPolicy
impl RuntimeBootstrapPolicy for GenericAllocationPolicy
Source§fn runtime_bootstrap_identity(
&self,
) -> Result<PolicyIdentity, PolicyIdentityError>
fn runtime_bootstrap_identity( &self, ) -> Result<PolicyIdentity, PolicyIdentityError>
Construct the bounded semantic identity of this policy configuration.
Source§fn 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. Read more
Auto Trait Implementations§
impl Freeze for GenericAllocationPolicy
impl RefUnwindSafe for GenericAllocationPolicy
impl Send for GenericAllocationPolicy
impl Sync for GenericAllocationPolicy
impl Unpin for GenericAllocationPolicy
impl UnsafeUnpin for GenericAllocationPolicy
impl UnwindSafe for GenericAllocationPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more