pub trait RuleParser {
// Required methods
fn parse_file(&self, path: &Path) -> Result<Vec<UnifiedRule>>;
fn parse_content(&self, content: &str) -> Result<Vec<UnifiedRule>>;
fn editor(&self) -> Editor;
}Expand description
Trait for parsing editor-specific rule formats
Required Methods§
Sourcefn parse_file(&self, path: &Path) -> Result<Vec<UnifiedRule>>
fn parse_file(&self, path: &Path) -> Result<Vec<UnifiedRule>>
Parse rules from a file
Sourcefn parse_content(&self, content: &str) -> Result<Vec<UnifiedRule>>
fn parse_content(&self, content: &str) -> Result<Vec<UnifiedRule>>
Parse rules from content
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".