#[non_exhaustive]pub struct CycleViolation {
pub cycle: Vec<ProjectedEdge>,
pub path: Vec<String>,
}Expand description
One closed circular path through a projected dependency graph.
The edge data remains available for evidence-rich reports, while Self::path provides the
label sequence needed by human-readable formatters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cycle: Vec<ProjectedEdge>The projected dependencies in traversal order.
path: Vec<String>The closed label path, including the starting label again at the end.
Implementations§
Source§impl CycleViolation
impl CycleViolation
Sourcepub fn new(cycle: impl IntoIterator<Item = ProjectedEdge>) -> Self
pub fn new(cycle: impl IntoIterator<Item = ProjectedEdge>) -> Self
Creates violation data from one projected cycle.
Trait Implementations§
Source§impl Clone for CycleViolation
impl Clone for CycleViolation
Source§fn clone(&self) -> CycleViolation
fn clone(&self) -> CycleViolation
Returns a copy 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 CycleViolation
impl Debug for CycleViolation
Source§impl From<CycleViolation> for Violation
impl From<CycleViolation> for Violation
Source§fn from(violation: CycleViolation) -> Self
fn from(violation: CycleViolation) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CycleViolation
impl PartialEq for CycleViolation
impl Eq for CycleViolation
impl StructuralPartialEq for CycleViolation
Auto Trait Implementations§
impl Freeze for CycleViolation
impl RefUnwindSafe for CycleViolation
impl Send for CycleViolation
impl Sync for CycleViolation
impl Unpin for CycleViolation
impl UnwindSafe for CycleViolation
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.