pub struct GenericRangePolicy;Expand description
GenericRangePolicy
Built-in bootstrap policy used by the no-argument default-runtime helpers. The runtime enforces registered range ownership and internal reservations; this policy adds no application-specific restrictions. Passing it directly to allocation validation outside the runtime does not enforce those ranges.
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 GenericRangePolicy
impl AllocationPolicy for GenericRangePolicy
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: &AllocationSlotDescriptor,
) -> Result<(), Self::Error>
fn validate_slot( &self, _key: &StableKey, _slot: &AllocationSlotDescriptor, ) -> Result<(), Self::Error>
Validate a stable-key to allocation-slot claim.
Source§fn validate_reserved_slot(
&self,
_key: &StableKey,
_slot: &AllocationSlotDescriptor,
) -> Result<(), Self::Error>
fn validate_reserved_slot( &self, _key: &StableKey, _slot: &AllocationSlotDescriptor, ) -> Result<(), Self::Error>
Validate a reserved stable-key to allocation-slot claim.
Source§impl RuntimeBootstrapPolicy for GenericRangePolicy
impl RuntimeBootstrapPolicy for GenericRangePolicy
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 GenericRangePolicy
impl RefUnwindSafe for GenericRangePolicy
impl Send for GenericRangePolicy
impl Sync for GenericRangePolicy
impl Unpin for GenericRangePolicy
impl UnsafeUnpin for GenericRangePolicy
impl UnwindSafe for GenericRangePolicy
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