pub enum MemoryRegistryError {
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),
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,
},
}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.
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 reserved for stable-structures internals.
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)>
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()
Auto Trait Implementations§
impl Freeze for MemoryRegistryError
impl RefUnwindSafe for MemoryRegistryError
impl Send for MemoryRegistryError
impl Sync for MemoryRegistryError
impl Unpin for MemoryRegistryError
impl UnsafeUnpin for MemoryRegistryError
impl UnwindSafe for MemoryRegistryError
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