pub enum DagError {
CycleDetected(String),
InvalidNode(String),
InvalidEdge {
from: String,
to: String,
message: String,
},
EmptyDag,
UnreachableNode(String),
MissingDependency(String),
}Expand description
DAG-specific errors.
Variants§
CycleDetected(String)
Cycle detected in DAG.
InvalidNode(String)
Invalid node ID.
InvalidEdge
Invalid edge.
EmptyDag
Empty DAG error.
UnreachableNode(String)
Unreachable node error.
MissingDependency(String)
Missing dependency error.
Implementations§
Source§impl DagError
impl DagError
Sourcepub fn invalid_node<S: Into<String>>(node_id: S) -> Self
pub fn invalid_node<S: Into<String>>(node_id: S) -> Self
Create an invalid node error.
Sourcepub fn invalid_edge<S1: Into<String>, S2: Into<String>, S3: Into<String>>(
from: S1,
to: S2,
message: S3,
) -> Self
pub fn invalid_edge<S1: Into<String>, S2: Into<String>, S3: Into<String>>( from: S1, to: S2, message: S3, ) -> Self
Create an invalid edge error.
Sourcepub fn missing_dependency<S: Into<String>>(dep: S) -> Self
pub fn missing_dependency<S: Into<String>>(dep: S) -> Self
Create a missing dependency error.
Trait Implementations§
Source§impl Error for DagError
impl Error for DagError
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()
Auto Trait Implementations§
impl Freeze for DagError
impl RefUnwindSafe for DagError
impl Send for DagError
impl Sync for DagError
impl Unpin for DagError
impl UnsafeUnpin for DagError
impl UnwindSafe for DagError
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.