pub struct Rule {
pub title: String,
pub impact: Impact,
pub description: String,
pub tags: Vec<String>,
pub content: String,
pub correct_examples: Vec<String>,
pub incorrect_examples: Vec<String>,
}Expand description
A rule extracted from the Skills repository
Fields§
§title: String§impact: Impact§description: String§content: String§correct_examples: Vec<String>§incorrect_examples: Vec<String>Implementations§
Source§impl Rule
impl Rule
Sourcepub fn from_file(path: &Path) -> Result<Self, SkillsError>
pub fn from_file(path: &Path) -> Result<Self, SkillsError>
Parse a rule from a markdown file
Sourcepub fn from_content(content: &str) -> Result<Self, SkillsError>
pub fn from_content(content: &str) -> Result<Self, SkillsError>
Parse a rule from markdown content
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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