#[non_exhaustive]pub enum Error {
StaleIndex,
CapacityExceeded,
CounterOverflow,
}Expand description
Failure modes returned by the public APIs of arena-lib.
The enum is #[non_exhaustive]: callers must include a wildcard arm when
matching so future variants can be added in minor releases without
breaking source compatibility.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StaleIndex
The provided index does not point to a live element.
Returned when an Index is used after its slot has
been removed and either left vacant or re-issued under a new
generation, or when the index was never live in this arena.
CapacityExceeded
An allocation request exceeded the allocator’s available capacity.
Returned by Bump::try_alloc and
related fallible allocation entry points when the underlying buffer
could not be grown to satisfy the request.
CounterOverflow
A monotonic counter would have wrapped past its representable range.
Returned by Arena::insert and the
interner when generation or symbol counters reach their upper bound.
Treat this as a permanent failure: drop the affected container and
build a new one.
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.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()