#[non_exhaustive]pub enum AstCoreError {
StaleHandle {
slot: u32,
expected: u32,
found: u32,
},
UnknownSlot {
slot: u32,
},
Exhausted,
MalformedSnapshot {
offset: usize,
expected: &'static str,
},
CommitRejected {
reason: &'static str,
},
}Expand description
Failure of a core infrastructure operation.
The public API returns these; it never panics. Spec §10.
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.
StaleHandle
A handle was used after its node was removed. The slot may since have been reused by a different node; reading through the stale handle would have addressed that unrelated node.
Fields
UnknownSlot
A handle referred to a slot the arena never allocated.
Exhausted
The arena exhausted its slot or generation space, or an identity allocator exhausted its counter.
MalformedSnapshot
A snapshot could not be decoded. Spec §9.
Fields
CommitRejected
A commit was rejected by validation and rolled back. Spec §5.1.
Trait Implementations§
Source§impl Clone for AstCoreError
impl Clone for AstCoreError
Source§impl Debug for AstCoreError
impl Debug for AstCoreError
Source§impl Display for AstCoreError
impl Display for AstCoreError
impl Eq for AstCoreError
Source§impl Error for AstCoreError
impl Error for AstCoreError
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 PartialEq for AstCoreError
impl PartialEq for AstCoreError
impl StructuralPartialEq for AstCoreError
Auto Trait Implementations§
impl Freeze for AstCoreError
impl RefUnwindSafe for AstCoreError
impl Send for AstCoreError
impl Sync for AstCoreError
impl Unpin for AstCoreError
impl UnsafeUnpin for AstCoreError
impl UnwindSafe for AstCoreError
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