#[non_exhaustive]pub enum Error {
Show 14 variants
Stale(CellId),
StaleText(TextId),
TooLong {
len: usize,
max: usize,
},
BufferTooSmall {
required: usize,
available: usize,
},
Corrupt(String),
TypeMismatch {
id: CellId,
expected: &'static str,
found: &'static str,
},
Overflow,
WakeExhausted,
Contended,
RevisionExhausted,
OwnerExhausted,
Full {
capacity: usize,
},
Malformed(String),
Io(Error),
}Expand description
Additions are expected: a cause discovered later lands here rather than in a new major version, so a caller matches what it handles and leaves the rest to a catch-all.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Stale(CellId)
The id names a slot nothing occupies, or a generation that has been released since the id was minted.
StaleText(TextId)
The same, for a text cell.
TooLong
The text would not fit the cell; nothing was written.
BufferTooSmall
The caller’s read buffer cannot hold the validated text snapshot.
Corrupt(String)
A text cell held bytes that are not UTF-8: something wrote past the contract.
TypeMismatch
The id names a live cell of another type.
Overflow
The update would leave the integer range.
WakeExhausted
The native parking generation reached its limit. Value access still works; release and reallocate to obtain a new parking generation.
Contended
A bounded text read raced bank reuse, or another live writer holds the cell. The operation does not spin or wait for that writer.
RevisionExhausted
The full-width text publication sequence cannot advance without ABA.
OwnerExhausted
A text owner row cannot mint another distinct incarnation.
Full
No slot is reusable: slots may be live, pinned after release, or have exhausted their generation range.
Malformed(String)
The text is not a cell id.
Io(Error)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()