pub struct RuleTestCase {
pub input: String,
pub should_match: bool,
pub ignore_comments: Option<bool>,
pub ignore_strings: Option<bool>,
pub language: Option<String>,
pub description: Option<String>,
}Expand description
A test case for validating a rule’s behavior.
Fields§
§input: StringThe input line to test against the rule.
should_match: boolWhether the rule should match this input.
ignore_comments: Option<bool>Optional: override ignore_comments for this test case.
ignore_strings: Option<bool>Optional: override ignore_strings for this test case.
language: Option<String>Optional: specify a language for preprocessing (e.g., “rust”, “python”).
description: Option<String>Optional: description of what this test case validates.
Trait Implementations§
Source§impl Clone for RuleTestCase
impl Clone for RuleTestCase
Source§fn clone(&self) -> RuleTestCase
fn clone(&self) -> RuleTestCase
Returns a duplicate 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 RuleTestCase
impl Debug for RuleTestCase
Source§impl<'de> Deserialize<'de> for RuleTestCase
impl<'de> Deserialize<'de> for RuleTestCase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for RuleTestCase
impl JsonSchema for RuleTestCase
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for RuleTestCase
impl PartialEq for RuleTestCase
Source§impl Serialize for RuleTestCase
impl Serialize for RuleTestCase
impl Eq for RuleTestCase
impl StructuralPartialEq for RuleTestCase
Auto Trait Implementations§
impl Freeze for RuleTestCase
impl RefUnwindSafe for RuleTestCase
impl Send for RuleTestCase
impl Sync for RuleTestCase
impl Unpin for RuleTestCase
impl UnsafeUnpin for RuleTestCase
impl UnwindSafe for RuleTestCase
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