#[non_exhaustive]pub enum AllocationValidationError<P> {
Policy(P),
StableKeySlotConflict {
stable_key: StableKey,
historical_slot: MemoryManagerSlot,
declared_slot: MemoryManagerSlot,
},
SlotStableKeyConflict {
slot: MemoryManagerSlot,
historical_key: StableKey,
declared_key: StableKey,
},
RetiredAllocation {
stable_key: StableKey,
slot: MemoryManagerSlot,
},
}Expand description
AllocationValidationError
Failure to validate declarations against policy and historical ledger facts. Construction and decoding establish snapshot invariants; recovery establishes ledger integrity before this boundary.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Policy(P)
Policy adapter rejected the declaration.
StableKeySlotConflict
Stable key was historically bound to a different slot.
Fields
§
historical_slot: MemoryManagerSlotHistorical slot for the stable key.
§
declared_slot: MemoryManagerSlotSlot claimed by the current declaration.
SlotStableKeyConflict
Slot was historically bound to a different stable key.
Fields
§
slot: MemoryManagerSlotSlot claimed by the current declaration.
RetiredAllocation
Current declaration attempted to revive a retired allocation.
Trait Implementations§
Source§impl<P: Clone> Clone for AllocationValidationError<P>
impl<P: Clone> Clone for AllocationValidationError<P>
Source§impl<P: Debug> Debug for AllocationValidationError<P>
impl<P: Debug> Debug for AllocationValidationError<P>
Source§impl<P> Display for AllocationValidationError<P>
impl<P> Display for AllocationValidationError<P>
impl<P: Eq> Eq for AllocationValidationError<P>
Source§impl<P> Error for AllocationValidationError<P>
impl<P> Error for AllocationValidationError<P>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<P> From<AllocationValidationError<RuntimePolicyError<P>>> for RuntimeBootstrapError<P>
impl<P> From<AllocationValidationError<RuntimePolicyError<P>>> for RuntimeBootstrapError<P>
Source§fn from(source: AllocationValidationError<RuntimePolicyError<P>>) -> Self
fn from(source: AllocationValidationError<RuntimePolicyError<P>>) -> Self
Converts to this type from the input type.
Source§impl<P: PartialEq> PartialEq for AllocationValidationError<P>
impl<P: PartialEq> PartialEq for AllocationValidationError<P>
impl<P: PartialEq> StructuralPartialEq for AllocationValidationError<P>
Auto Trait Implementations§
impl<P> Freeze for AllocationValidationError<P>where
P: Freeze,
impl<P> RefUnwindSafe for AllocationValidationError<P>where
P: RefUnwindSafe,
impl<P> Send for AllocationValidationError<P>where
P: Send,
impl<P> Sync for AllocationValidationError<P>where
P: Sync,
impl<P> Unpin for AllocationValidationError<P>where
P: Unpin,
impl<P> UnsafeUnpin for AllocationValidationError<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for AllocationValidationError<P>where
P: UnwindSafe,
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