#[non_exhaustive]pub struct LayerDependencyViolation {
pub dependency: ProjectedEdge,
pub source_layer: String,
pub target_layer: String,
pub rule: LayerDependencyRule,
}Expand description
One cross-layer dependency rejected by a named-layer policy.
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.dependency: ProjectedEdgeThe concrete file dependency and every raw Rust reference behind it.
source_layer: StringThe declared layer containing the dependency source file.
target_layer: StringThe declared layer containing the dependency target file.
rule: LayerDependencyRuleThe policy kind that rejected the dependency.
Implementations§
Source§impl LayerDependencyViolation
impl LayerDependencyViolation
Sourcepub fn new(
dependency: ProjectedEdge,
source_layer: impl Into<String>,
target_layer: impl Into<String>,
rule: LayerDependencyRule,
) -> Self
pub fn new( dependency: ProjectedEdge, source_layer: impl Into<String>, target_layer: impl Into<String>, rule: LayerDependencyRule, ) -> Self
Creates data for one rejected cross-layer dependency.
Trait Implementations§
Source§impl Clone for LayerDependencyViolation
impl Clone for LayerDependencyViolation
Source§fn clone(&self) -> LayerDependencyViolation
fn clone(&self) -> LayerDependencyViolation
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 LayerDependencyViolation
impl Debug for LayerDependencyViolation
Source§impl From<LayerDependencyViolation> for Violation
impl From<LayerDependencyViolation> for Violation
Source§fn from(violation: LayerDependencyViolation) -> Self
fn from(violation: LayerDependencyViolation) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LayerDependencyViolation
impl PartialEq for LayerDependencyViolation
impl Eq for LayerDependencyViolation
impl StructuralPartialEq for LayerDependencyViolation
Auto Trait Implementations§
impl Freeze for LayerDependencyViolation
impl RefUnwindSafe for LayerDependencyViolation
impl Send for LayerDependencyViolation
impl Sync for LayerDependencyViolation
impl Unpin for LayerDependencyViolation
impl UnwindSafe for LayerDependencyViolation
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.