pub struct CanicMemoryManagerPolicy { /* private fields */ }Expand description
CanicMemoryManagerPolicy
Canic policy adapter for the ic-memory MemoryManager substrate
allocation slots.
Owned by memory policy and supplied to memory-manager bootstrap.
Implementations§
Source§impl CanicMemoryManagerPolicy
impl CanicMemoryManagerPolicy
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Use Canic’s fixed namespace and range policy without a consumer callback.
Sourcepub fn with_admission(self, admission: MemoryBootstrapAdmission) -> Self
pub fn with_admission(self, admission: MemoryBootstrapAdmission) -> Self
Compose consumer admission while retaining all Canic namespace/range checks.
Trait Implementations§
Source§impl AllocationPolicy for CanicMemoryManagerPolicy
impl AllocationPolicy for CanicMemoryManagerPolicy
Source§type Error = MemoryRegistryError
type Error = MemoryRegistryError
Policy error type.
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 Clone for CanicMemoryManagerPolicy
impl Clone for CanicMemoryManagerPolicy
Source§impl Debug for CanicMemoryManagerPolicy
impl Debug for CanicMemoryManagerPolicy
Source§impl Default for CanicMemoryManagerPolicy
impl Default for CanicMemoryManagerPolicy
Source§impl RuntimeBootstrapPolicy for CanicMemoryManagerPolicy
impl RuntimeBootstrapPolicy for CanicMemoryManagerPolicy
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
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.
Auto Trait Implementations§
impl Freeze for CanicMemoryManagerPolicy
impl RefUnwindSafe for CanicMemoryManagerPolicy
impl Send for CanicMemoryManagerPolicy
impl Sync for CanicMemoryManagerPolicy
impl Unpin for CanicMemoryManagerPolicy
impl UnsafeUnpin for CanicMemoryManagerPolicy
impl UnwindSafe for CanicMemoryManagerPolicy
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