pub enum ErrorCode {
InvalidMean = 100,
InvalidVariance = 101,
InvalidProbability = 102,
InvalidRange = 103,
InvalidShape = 104,
InvalidRate = 105,
InvalidCount = 106,
AddressConflict = 301,
UnexpectedModelStructure = 302,
TraceAddressNotFound = 500,
TypeMismatch = 600,
}Expand description
Error codes for programmatic error handling and categorization.
Every variant here is constructed by real logic somewhere in the crate — see the module-level table. If you’re adding a new failure mode, add the code here and wire it into the code path that detects it in the same change; don’t add speculative codes for failure modes nothing produces yet (FG-33).
Variants§
InvalidMean = 100
InvalidVariance = 101
InvalidProbability = 102
InvalidRange = 103
InvalidShape = 104
InvalidRate = 105
InvalidCount = 106
AddressConflict = 301
UnexpectedModelStructure = 302
TraceAddressNotFound = 500
TypeMismatch = 600
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get a human-readable description of the error code.
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
Get the category of the error (first digit of the code).
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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