pub struct TomlRule {Show 20 fields
pub id: String,
pub rule_type: String,
pub severity: String,
pub glob: Option<String>,
pub message: String,
pub suggest: Option<String>,
pub allowed_classes: Vec<String>,
pub token_map: Vec<String>,
pub pattern: Option<String>,
pub max_count: Option<usize>,
pub packages: Vec<String>,
pub regex: bool,
pub manifest: Option<String>,
pub exclude_glob: Vec<String>,
pub file_contains: Option<String>,
pub file_not_contains: Option<String>,
pub required_files: Vec<String>,
pub forbidden_files: Vec<String>,
pub condition_pattern: Option<String>,
pub skip_strings: bool,
}Expand description
A single [[rule]] entry.
Fields§
§id: String§rule_type: String§severity: String§glob: Option<String>§message: String§suggest: Option<String>§allowed_classes: Vec<String>§token_map: Vec<String>§pattern: Option<String>§max_count: Option<usize>§packages: Vec<String>§regex: bool§manifest: Option<String>§exclude_glob: Vec<String>§file_contains: Option<String>§file_not_contains: Option<String>§required_files: Vec<String>§forbidden_files: Vec<String>§condition_pattern: Option<String>§skip_strings: boolImplementations§
Source§impl TomlRule
impl TomlRule
Sourcepub fn to_rule_config(&self) -> RuleConfig
pub fn to_rule_config(&self) -> RuleConfig
Convert to the core RuleConfig type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TomlRule
impl<'de> Deserialize<'de> for TomlRule
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
Auto Trait Implementations§
impl Freeze for TomlRule
impl RefUnwindSafe for TomlRule
impl Send for TomlRule
impl Sync for TomlRule
impl Unpin for TomlRule
impl UnsafeUnpin for TomlRule
impl UnwindSafe for TomlRule
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more