pub enum MemoryRegistryError {
Show 16 variants
Overlap {
existing_crate: String,
existing_start: u8,
existing_end: u8,
new_crate: String,
new_start: u8,
new_end: u8,
},
InvalidRange {
start: u8,
end: u8,
},
DuplicateId(u8),
DuplicateStableKey(String),
NoReservedRange {
crate_name: String,
id: u8,
},
IdOwnedByOther {
crate_name: String,
id: u8,
owner: String,
owner_start: u8,
owner_end: u8,
},
IdOutOfRange {
crate_name: String,
id: u8,
},
ReservedInternalId {
id: u8,
},
HistoricalRangeConflict {
existing_crate: String,
existing_start: u8,
existing_end: u8,
new_crate: String,
new_start: u8,
new_end: u8,
},
HistoricalIdConflict {
id: u8,
existing_crate: String,
existing_label: String,
new_crate: String,
new_label: String,
new_stable_key: String,
},
HistoricalStableKeyConflict {
stable_key: String,
existing_id: u8,
new_id: u8,
},
InvalidStableKey {
stable_key: String,
reason: &'static str,
},
RangeAuthorityViolation {
stable_key: String,
id: u8,
reason: &'static str,
},
RegistrationAfterBootstrap {
ranges: usize,
registrations: usize,
},
RegistryNotBootstrapped,
LedgerCorrupt {
reason: &'static str,
},
}Expand description
MemoryRegistryError
Errors returned when a memory range or ID registration is invalid.
Variants§
Overlap
A requested owner range overlaps an already reserved range.
Fields
InvalidRange
The requested range has start > end.
DuplicateId(u8)
The memory ID is already registered.
DuplicateStableKey(String)
The stable key is declared more than once in one runtime snapshot.
NoReservedRange
The crate attempted to register an ID before reserving any range.
Fields
IdOwnedByOther
The ID falls inside a range reserved by another crate.
Fields
IdOutOfRange
The crate has reserved ranges, but none contain the requested ID.
Fields
ReservedInternalId
The ID is the unallocated-bucket sentinel and is not usable.
HistoricalRangeConflict
A requested range conflicts with a range recorded in the stable layout ledger.
Fields
HistoricalIdConflict
A requested ID conflicts with an ID recorded in the stable layout ledger.
Fields
HistoricalStableKeyConflict
A requested stable key conflicts with a different historical ID.
Fields
InvalidStableKey
The stable key is not canonical.
Fields
RangeAuthorityViolation
The stable key namespace and memory ID range do not match.
Fields
RegistrationAfterBootstrap
Registration was attempted after the bootstrap declaration snapshot was sealed.
Fields
RegistryNotBootstrapped
A memory handle was requested before bootstrap validated the declaration snapshot.
LedgerCorrupt
The persisted ABI ledger cannot be validated.
Trait Implementations§
Source§impl Debug for MemoryRegistryError
impl Debug for MemoryRegistryError
Source§impl Display for MemoryRegistryError
impl Display for MemoryRegistryError
Source§impl Error for MemoryRegistryError
impl Error for MemoryRegistryError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()