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 into_message(self) -> String
pub fn into_message(self) -> String
Consume and return the rendered internal error message.
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)>
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()
Source§impl From<InternalError> for ExecutionError
impl From<InternalError> for ExecutionError
Source§fn from(err: InternalError) -> Self
fn from(err: InternalError) -> Self
Converts to this type from the input type.
Source§impl From<MergePatchError> for InternalError
impl From<MergePatchError> for InternalError
Source§fn from(err: MergePatchError) -> Self
fn from(err: MergePatchError) -> Self
Converts to this type from the input type.
Source§impl From<VisitorError> for InternalError
impl From<VisitorError> for InternalError
Source§fn from(err: VisitorError) -> Self
fn from(err: VisitorError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InternalError
impl RefUnwindSafe for InternalError
impl Send for InternalError
impl Sync for InternalError
impl Unpin for InternalError
impl UnsafeUnpin for InternalError
impl UnwindSafe for InternalError
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