pub enum GraphError {
NoEntryNode,
NodeNotFound(String),
CycleDetected,
ExecutionFailed {
node: String,
message: String,
},
MaxStepsExceeded(u32),
InvalidGraph(String),
Persistence(String),
Serialization(String),
Other(Error),
}Expand description
Errors that can occur during graph execution.
Variants§
NoEntryNode
No entry node defined.
NodeNotFound(String)
Node not found.
CycleDetected
Cycle detected.
ExecutionFailed
Node execution failed.
MaxStepsExceeded(u32)
Maximum steps exceeded.
InvalidGraph(String)
Invalid graph structure.
Persistence(String)
Persistence error.
Serialization(String)
Serialization error.
Other(Error)
Other error.
Implementations§
Source§impl GraphError
impl GraphError
Sourcepub fn node_not_found(name: impl Into<String>) -> Self
pub fn node_not_found(name: impl Into<String>) -> Self
Create a node not found error.
Sourcepub fn execution_failed(
node: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn execution_failed( node: impl Into<String>, message: impl Into<String>, ) -> Self
Create an execution failed error.
Sourcepub fn persistence(msg: impl Into<String>) -> Self
pub fn persistence(msg: impl Into<String>) -> Self
Create a persistence error.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
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<Error> for GraphError
impl From<Error> for GraphError
Source§impl From<PersistenceError> for GraphError
impl From<PersistenceError> for GraphError
Source§fn from(e: PersistenceError) -> Self
fn from(e: PersistenceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GraphError
impl RefUnwindSafe for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl UnwindSafe for GraphError
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