pub struct ConfigSyntaxFixGenerator;
Expand description
Generates fixes for malformed configuration files (JSON, YAML, TOML)
Implementations§
Source§impl ConfigSyntaxFixGenerator
impl ConfigSyntaxFixGenerator
Sourcepub fn is_json_syntax_error(&self, message: &str, file_path: &str) -> bool
pub fn is_json_syntax_error(&self, message: &str, file_path: &str) -> bool
Detects if the error is related to a JSON syntax error
Sourcepub fn is_yaml_syntax_error(&self, message: &str, file_path: &str) -> bool
pub fn is_yaml_syntax_error(&self, message: &str, file_path: &str) -> bool
Detects if the error is related to a YAML syntax error
Sourcepub fn is_toml_syntax_error(&self, message: &str, file_path: &str) -> bool
pub fn is_toml_syntax_error(&self, message: &str, file_path: &str) -> bool
Detects if the error is related to a TOML syntax error
Trait Implementations§
Source§impl FixGenerator for ConfigSyntaxFixGenerator
impl FixGenerator for ConfigSyntaxFixGenerator
Source§fn generate_fix(
&self,
error: &DecrustError,
params: &ExtractedParameters,
_source_code_context: Option<&str>,
) -> Option<Autocorrection>
fn generate_fix( &self, error: &DecrustError, params: &ExtractedParameters, _source_code_context: Option<&str>, ) -> Option<Autocorrection>
Generates a fix for an error using extracted parameters
Auto Trait Implementations§
impl Freeze for ConfigSyntaxFixGenerator
impl RefUnwindSafe for ConfigSyntaxFixGenerator
impl Send for ConfigSyntaxFixGenerator
impl Sync for ConfigSyntaxFixGenerator
impl Unpin for ConfigSyntaxFixGenerator
impl UnwindSafe for ConfigSyntaxFixGenerator
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