pub struct InternalError { /* private fields */ }Expand description
InternalError
Structured runtime error with a stable internal classification. Not a stable API; intended for internal use and may change without notice.
Implementations§
Source§impl InternalError
impl InternalError
Sourcepub fn new(
class: ErrorClass,
origin: ErrorOrigin,
message: impl Into<String>,
) -> Self
pub fn new( class: ErrorClass, origin: ErrorOrigin, message: impl Into<String>, ) -> Self
Construct an InternalError with optional origin-specific detail. This constructor provides default StoreError details for certain (class, origin) combinations but does not guarantee a detail payload.
Sourcepub const fn class(&self) -> ErrorClass
pub const fn class(&self) -> ErrorClass
Return the internal error class taxonomy.
Sourcepub const fn origin(&self) -> ErrorOrigin
pub const fn origin(&self) -> ErrorOrigin
Return the internal error origin taxonomy.
Sourcepub const fn detail(&self) -> Option<&ErrorDetail>
pub const fn detail(&self) -> Option<&ErrorDetail>
Return the optional structured detail payload.
Sourcepub fn diagnostic(&self) -> Diagnostic
pub fn diagnostic(&self) -> Diagnostic
Return compact diagnostic identity for this internal error.
Sourcepub fn diagnostic_code(&self) -> DiagnosticCode
pub fn diagnostic_code(&self) -> DiagnosticCode
Return the compact diagnostic code for this internal error.
Sourcepub fn into_message(self) -> String
pub fn into_message(self) -> String
Consume and return the rendered internal error message.
Construct an executor-origin typed create omission rejection.
Sourcepub fn missing_persisted_slot(field_name: &'static str) -> Self
pub fn missing_persisted_slot(field_name: &'static str) -> Self
Construct the canonical missing persisted-field decode error.
pub fn store_not_found(key: impl Into<String>) -> Self
Sourcepub fn unsupported_entity_path(path: impl Into<String>) -> Self
pub fn unsupported_entity_path(path: impl Into<String>) -> Self
Construct a standardized unsupported-entity-path error.
pub const fn is_not_found(&self) -> bool
pub fn display_with_class(&self) -> String
Trait Implementations§
Source§impl Debug for InternalError
impl Debug for InternalError
Source§impl Display for InternalError
impl Display for InternalError
Source§impl Error for InternalError
impl Error for InternalError
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()