pub struct RuleTest {
pub name: Option<String>,
pub text: String,
pub violations: usize,
pub messages: Vec<String>,
}Expand description
One embedded rule test: a snippet and what the rule should do with
it. Run by declint test.
Fields§
§name: Option<String>Optional label shown in test output.
text: StringThe snippet the rule runs against.
violations: usizeHow many violations of the rule the snippet should produce (default 0).
messages: Vec<String>Each of these must appear among the rendered messages.
Trait Implementations§
impl Eq for RuleTest
impl StructuralPartialEq for RuleTest
Auto Trait Implementations§
impl Freeze for RuleTest
impl RefUnwindSafe for RuleTest
impl Send for RuleTest
impl Sync for RuleTest
impl Unpin for RuleTest
impl UnsafeUnpin for RuleTest
impl UnwindSafe for RuleTest
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.