pub struct CycleWarning {
pub cycle_path: Vec<String>,
pub edge_from: String,
pub edge_to: String,
}Expand description
A warning emitted when a new blocking edge would close a cycle.
Contains the cycle path (ordered list of item IDs forming the loop) and the edge that triggered detection.
Fields§
§cycle_path: Vec<String>The ordered list of item IDs forming the cycle.
The path starts at the source of the new edge, follows blocking
dependencies, and ends at the source again. For example, if
adding edge A→B creates cycle A→B→C→A, the path is ["A", "B", "C", "A"].
edge_from: StringThe source of the newly added edge (the item being blocked).
edge_to: StringThe target of the newly added edge (the blocker).
Implementations§
Source§impl CycleWarning
impl CycleWarning
Sourcepub fn cycle_len(&self) -> usize
pub fn cycle_len(&self) -> usize
Number of distinct items in the cycle (path length minus the repeated start node).
Sourcepub fn is_self_loop(&self) -> bool
pub fn is_self_loop(&self) -> bool
Returns true if this is a self-loop (item blocks itself).
Sourcepub fn is_mutual_block(&self) -> bool
pub fn is_mutual_block(&self) -> bool
Returns true if this is a mutual block (2-node cycle: A↔B).
Trait Implementations§
Source§impl Clone for CycleWarning
impl Clone for CycleWarning
Source§fn clone(&self) -> CycleWarning
fn clone(&self) -> CycleWarning
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 CycleWarning
impl Debug for CycleWarning
Source§impl Display for CycleWarning
impl Display for CycleWarning
Source§impl PartialEq for CycleWarning
impl PartialEq for CycleWarning
impl Eq for CycleWarning
impl StructuralPartialEq for CycleWarning
Auto Trait Implementations§
impl Freeze for CycleWarning
impl RefUnwindSafe for CycleWarning
impl Send for CycleWarning
impl Sync for CycleWarning
impl Unpin for CycleWarning
impl UnsafeUnpin for CycleWarning
impl UnwindSafe for CycleWarning
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.