#[non_exhaustive]pub struct SliceDependencyViolation {
pub dependency: ProjectedEdge,
pub source_slice: String,
pub target_slice: String,
pub rule: SliceDependencyRule,
pub is_negated: bool,
}Expand description
One projected slice dependency rejected by a slice architecture rule.
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 projected dependency and every concrete Rust file edge behind it.
source_slice: StringThe selected dependency source slice.
target_slice: StringThe selected dependency target slice or external crate.
rule: SliceDependencyRuleThe policy kind that rejected the dependency.
is_negated: boolWhether the fluent rule used the negated mood.
Implementations§
Source§impl SliceDependencyViolation
impl SliceDependencyViolation
Sourcepub fn new(
dependency: ProjectedEdge,
source_slice: impl Into<String>,
target_slice: impl Into<String>,
rule: SliceDependencyRule,
is_negated: bool,
) -> Self
pub fn new( dependency: ProjectedEdge, source_slice: impl Into<String>, target_slice: impl Into<String>, rule: SliceDependencyRule, is_negated: bool, ) -> Self
Creates structured data for one rejected slice dependency.
Trait Implementations§
Source§impl Clone for SliceDependencyViolation
impl Clone for SliceDependencyViolation
Source§fn clone(&self) -> SliceDependencyViolation
fn clone(&self) -> SliceDependencyViolation
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 SliceDependencyViolation
impl Debug for SliceDependencyViolation
Source§impl From<SliceDependencyViolation> for Violation
impl From<SliceDependencyViolation> for Violation
Source§fn from(violation: SliceDependencyViolation) -> Self
fn from(violation: SliceDependencyViolation) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SliceDependencyViolation
impl PartialEq for SliceDependencyViolation
impl Eq for SliceDependencyViolation
impl StructuralPartialEq for SliceDependencyViolation
Auto Trait Implementations§
impl Freeze for SliceDependencyViolation
impl RefUnwindSafe for SliceDependencyViolation
impl Send for SliceDependencyViolation
impl Sync for SliceDependencyViolation
impl Unpin for SliceDependencyViolation
impl UnwindSafe for SliceDependencyViolation
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.