pub enum AllocationValidationError<P> {
Policy(P),
StableKeySlotConflict {
stable_key: StableKey,
historical_slot: Box<AllocationSlotDescriptor>,
declared_slot: Box<AllocationSlotDescriptor>,
},
SlotStableKeyConflict {
slot: Box<AllocationSlotDescriptor>,
historical_key: StableKey,
declared_key: StableKey,
},
RetiredAllocation {
stable_key: StableKey,
slot: Box<AllocationSlotDescriptor>,
},
}Expand description
AllocationValidationError
Failure to validate declarations against policy and historical ledger facts.
Variants§
Policy(P)
Policy adapter rejected the declaration.
StableKeySlotConflict
Stable key was historically bound to a different slot.
Fields
§
historical_slot: Box<AllocationSlotDescriptor>Historical slot for the stable key.
§
declared_slot: Box<AllocationSlotDescriptor>Slot claimed by the current declaration.
SlotStableKeyConflict
Slot was historically bound to a different stable key.
Fields
§
slot: Box<AllocationSlotDescriptor>Slot claimed by the current declaration.
RetiredAllocation
Current declaration attempted to revive a retired allocation.
Fields
§
slot: Box<AllocationSlotDescriptor>Retired allocation slot.
Trait Implementations§
Source§impl<P: Clone> Clone for AllocationValidationError<P>
impl<P: Clone> Clone for AllocationValidationError<P>
Source§fn clone(&self) -> AllocationValidationError<P>
fn clone(&self) -> AllocationValidationError<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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>
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: PartialEq> PartialEq for AllocationValidationError<P>
impl<P: PartialEq> PartialEq for AllocationValidationError<P>
Source§fn eq(&self, other: &AllocationValidationError<P>) -> bool
fn eq(&self, other: &AllocationValidationError<P>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<P: Eq> Eq for AllocationValidationError<P>
impl<P> 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