pub struct Fixer { /* private fields */ }Implementations§
Source§impl Fixer
impl Fixer
pub fn new() -> Self
pub fn with_dry_run(dry_run: bool) -> Self
Sourcepub fn apply_fixes(&self, path: &Path, fixes: &[Fix]) -> Result<String>
pub fn apply_fixes(&self, path: &Path, fixes: &[Fix]) -> Result<String>
Apply fixes to a file and return the fixed content
Sourcepub fn apply_fixes_to_content(
&self,
content: &str,
fixes: &[Fix],
) -> Result<String>
pub fn apply_fixes_to_content( &self, content: &str, fixes: &[Fix], ) -> Result<String>
Apply fixes to content string
Sourcepub fn apply_file_fixes(&self, file_result: &FileResult) -> Result<()>
pub fn apply_file_fixes(&self, file_result: &FileResult) -> Result<()>
Apply fixes from a FileResult and write to disk
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fixer
impl RefUnwindSafe for Fixer
impl Send for Fixer
impl Sync for Fixer
impl Unpin for Fixer
impl UnsafeUnpin for Fixer
impl UnwindSafe for Fixer
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