pub enum AddError {
StaleId {
id: u32,
next: u32,
},
}Expand description
Failure modes for NumberedValues::add. Upstream uses assert(ID >= NextUnusedID); we prefer a typed error so the parser’s diagnostic path
can attribute the failure to a span.
Variants§
StaleId
id is strictly less than the next-unused frontier — the slot is
either already populated or skipped past. Mirrors the
"Invalid value ID" assertion in NumberedValues.h.
Trait Implementations§
impl Eq for AddError
Source§impl Error for AddError
impl Error for AddError
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()
impl StructuralPartialEq for AddError
Auto Trait Implementations§
impl Freeze for AddError
impl RefUnwindSafe for AddError
impl Send for AddError
impl Sync for AddError
impl Unpin for AddError
impl UnsafeUnpin for AddError
impl UnwindSafe for AddError
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