pub enum MemoryError {
Show 15 variants
AclLayoutUnsupported,
AutoincrementOverflow(String),
ConstraintViolation(String),
DataTooLarge {
page_size: u64,
requested: u64,
},
DecodeError(DecodeError),
FailedToAllocatePage,
UnclaimedPagesFull {
capacity: u32,
},
IndexNotFound(Vec<String>),
NameCollision {
candidate: String,
existing: String,
},
EntryNotFound,
KeyTooLarge {
size: u64,
max: u64,
},
OffsetNotAligned {
offset: u16,
alignment: u16,
},
OutOfBounds,
SegmentationFault {
page: u32,
offset: u16,
data_size: u64,
page_size: u64,
},
ProviderError(String),
}Expand description
An enum representing possible memory-related errors.
Variants§
AclLayoutUnsupported
Error when the persisted ACL page carries an unsupported layout
version. Returned by crate::dbms::acl decoders.
AutoincrementOverflow(String)
Error when an autoincrement column has reached its maximum value.
ConstraintViolation(String)
Error when a constraint prevents the requested operation.
DataTooLarge
Error when the data to be written is too large for the page.
DecodeError(DecodeError)
Error when failing to decode data from bytes.
FailedToAllocatePage
Error when failing to allocate a new page.
UnclaimedPagesFull
Error when the unclaimed-pages ledger has no room for another entry.
IndexNotFound(Vec<String>)
Error when no index exists for the requested columns.
NameCollision
Error when registering a table whose name hash collides with an already-registered table of a different name.
Fields
EntryNotFound
Error when an index entry cannot be located.
KeyTooLarge
Error when a single key cannot fit into a node page.
OffsetNotAligned
OutOfBounds
Error when attempting to access stable memory out of bounds.
SegmentationFault
Error when attempting to write out of the allocated page.
ProviderError(String)
Error from the underlying memory provider.
Trait Implementations§
Source§impl CandidType for MemoryError
impl CandidType for MemoryError
Source§impl Debug for MemoryError
impl Debug for MemoryError
Source§impl<'de> Deserialize<'de> for MemoryError
impl<'de> Deserialize<'de> for MemoryError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MemoryError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MemoryError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for MemoryError
impl Display for MemoryError
Source§impl Error for MemoryError
impl Error for MemoryError
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()