pub enum EulerError {
EmptyGraph,
Disconnected,
NoCircuit,
NoPath,
}Expand description
Errors returned by Euler path/circuit algorithms.
Variants§
EmptyGraph
The graph has no nodes.
Disconnected
The graph is disconnected (ignoring isolated nodes), so no Euler path or circuit can traverse all edges.
NoCircuit
The degree conditions for an Euler circuit are not met.
For undirected graphs: all nodes must have even degree. For directed graphs: every node must have equal in-degree and out-degree.
NoPath
The degree conditions for an Euler path are not met.
For undirected graphs: exactly two nodes must have odd degree.
For directed graphs: exactly one node must have out - in = 1 (start)
and one must have in - out = 1 (end).
Trait Implementations§
Source§impl Clone for EulerError
impl Clone for EulerError
Source§fn clone(&self) -> EulerError
fn clone(&self) -> EulerError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EulerError
impl Debug for EulerError
Source§impl Display for EulerError
impl Display for EulerError
Source§impl Error for EulerError
impl Error for EulerError
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 PartialEq for EulerError
impl PartialEq for EulerError
impl StructuralPartialEq for EulerError
Auto Trait Implementations§
impl Freeze for EulerError
impl RefUnwindSafe for EulerError
impl Send for EulerError
impl Sync for EulerError
impl Unpin for EulerError
impl UnwindSafe for EulerError
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