#[non_exhaustive]pub struct EmptyTestViolation {
pub subject: String,
pub selectors: Vec<Filter>,
pub is_negated: bool,
}Expand description
A rule selected no subject and therefore judged nothing.
Zero matches is a violation by default because a stale or misspelled selector would otherwise pass forever.
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.subject: StringThe rule family’s subject vocabulary, such as files, layers, or slices.
selectors: Vec<Filter>The selectors that, taken together, matched nothing, in fluent-chain order.
is_negated: boolWhether the empty selection occurred in a negated rule.
Implementations§
Source§impl EmptyTestViolation
impl EmptyTestViolation
Sourcepub fn new(
subject: impl Into<String>,
selectors: impl IntoIterator<Item = Filter>,
) -> Self
pub fn new( subject: impl Into<String>, selectors: impl IntoIterator<Item = Filter>, ) -> Self
Records the subject and selectors that matched nothing.
Sourcepub fn new_with_mood(
subject: impl Into<String>,
selectors: impl IntoIterator<Item = Filter>,
is_negated: bool,
) -> Self
pub fn new_with_mood( subject: impl Into<String>, selectors: impl IntoIterator<Item = Filter>, is_negated: bool, ) -> Self
Records the subject, selectors and fluent mood that matched nothing.
Trait Implementations§
Source§impl Clone for EmptyTestViolation
impl Clone for EmptyTestViolation
Source§fn clone(&self) -> EmptyTestViolation
fn clone(&self) -> EmptyTestViolation
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 EmptyTestViolation
impl Debug for EmptyTestViolation
Source§impl From<EmptyTestViolation> for Violation
impl From<EmptyTestViolation> for Violation
Source§fn from(violation: EmptyTestViolation) -> Self
fn from(violation: EmptyTestViolation) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EmptyTestViolation
impl RefUnwindSafe for EmptyTestViolation
impl Send for EmptyTestViolation
impl Sync for EmptyTestViolation
impl Unpin for EmptyTestViolation
impl UnwindSafe for EmptyTestViolation
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