pub struct RustLogicGraphError {
pub code: String,
pub message: String,
pub category: ErrorCategory,
pub suggestion: Option<String>,
pub doc_link: Option<String>,
pub context: ErrorContext,
pub source: Option<Box<dyn Error + Send + Sync>>,
}Expand description
Main error type for Rust Logic Graph
Fields§
§code: StringUnique error code (e.g., “E001”, “E002”)
message: StringHuman-readable error message
category: ErrorCategoryError classification for retry logic
suggestion: Option<String>Actionable suggestion for fixing the error
doc_link: Option<String>Link to documentation/troubleshooting
context: ErrorContextRich context about where error occurred
source: Option<Box<dyn Error + Send + Sync>>Underlying cause (if any)
Implementations§
Source§impl RustLogicGraphError
impl RustLogicGraphError
Sourcepub fn new(
code: impl Into<String>,
message: impl Into<String>,
category: ErrorCategory,
) -> Self
pub fn new( code: impl Into<String>, message: impl Into<String>, category: ErrorCategory, ) -> Self
Create a new error with code and message
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add an actionable suggestion
Sourcepub fn with_context(self, context: ErrorContext) -> Self
pub fn with_context(self, context: ErrorContext) -> Self
Add error context
Sourcepub fn with_source(self, source: impl Error + Send + Sync + 'static) -> Self
pub fn with_source(self, source: impl Error + Send + Sync + 'static) -> Self
Add underlying source error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if error is retryable
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Check if error is permanent
Source§impl RustLogicGraphError
impl RustLogicGraphError
Sourcepub fn node_execution_error(
node_id: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn node_execution_error( node_id: impl Into<String>, message: impl Into<String>, ) -> Self
Node execution error
Sourcepub fn database_connection_error(message: impl Into<String>) -> Self
pub fn database_connection_error(message: impl Into<String>) -> Self
Database connection error
Sourcepub fn rule_evaluation_error(message: impl Into<String>) -> Self
pub fn rule_evaluation_error(message: impl Into<String>) -> Self
Rule evaluation error
Sourcepub fn configuration_error(message: impl Into<String>) -> Self
pub fn configuration_error(message: impl Into<String>) -> Self
Configuration error
Sourcepub fn timeout_error(message: impl Into<String>) -> Self
pub fn timeout_error(message: impl Into<String>) -> Self
Timeout error
Sourcepub fn graph_validation_error(message: impl Into<String>) -> Self
pub fn graph_validation_error(message: impl Into<String>) -> Self
Graph validation error
Sourcepub fn serialization_error(message: impl Into<String>) -> Self
pub fn serialization_error(message: impl Into<String>) -> Self
Serialization error
Sourcepub fn cache_error(message: impl Into<String>) -> Self
pub fn cache_error(message: impl Into<String>) -> Self
Cache error
Sourcepub fn context_error(message: impl Into<String>) -> Self
pub fn context_error(message: impl Into<String>) -> Self
Context error
Sourcepub fn distributed_error(
message: impl Into<String>,
service: impl Into<String>,
) -> Self
pub fn distributed_error( message: impl Into<String>, service: impl Into<String>, ) -> Self
Distributed system error
Sourcepub fn transaction_error(message: impl Into<String>) -> Self
pub fn transaction_error(message: impl Into<String>) -> Self
Transaction coordination error
Trait Implementations§
Source§impl Debug for RustLogicGraphError
impl Debug for RustLogicGraphError
Source§impl Display for RustLogicGraphError
impl Display for RustLogicGraphError
Source§impl Error for RustLogicGraphError
impl Error for RustLogicGraphError
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()
Auto Trait Implementations§
impl Freeze for RustLogicGraphError
impl !RefUnwindSafe for RustLogicGraphError
impl Send for RustLogicGraphError
impl Sync for RustLogicGraphError
impl Unpin for RustLogicGraphError
impl !UnwindSafe for RustLogicGraphError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more