pub enum GraphError {
NoEntryNode,
NodeNotFound(String),
CycleDetected,
ExecutionFailed {
node: String,
message: String,
},
MaxStepsExceeded(u32),
InvalidGraph(String),
Persistence(String),
Serialization(String),
Other(Error),
}Available on crate feature
graph only.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>) -> GraphError
pub fn node_not_found(name: impl Into<String>) -> GraphError
Create a node not found error.
Sourcepub fn execution_failed(
node: impl Into<String>,
message: impl Into<String>,
) -> GraphError
pub fn execution_failed( node: impl Into<String>, message: impl Into<String>, ) -> GraphError
Create an execution failed error.
Sourcepub fn persistence(msg: impl Into<String>) -> GraphError
pub fn persistence(msg: impl Into<String>) -> GraphError
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§fn from(source: Error) -> GraphError
fn from(source: Error) -> GraphError
Converts to this type from the input type.
Source§impl From<PersistenceError> for GraphError
impl From<PersistenceError> for GraphError
Source§fn from(e: PersistenceError) -> GraphError
fn from(e: PersistenceError) -> GraphError
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.