pub struct EndingsNormalizer { /* private fields */ }Expand description
Line ending normalizer
Implementations§
Source§impl EndingsNormalizer
impl EndingsNormalizer
Sourcepub fn new(options: EndingsOptions) -> Self
pub fn new(options: EndingsOptions) -> Self
Creates a new normalizer with the given options
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Creates a normalizer with default options
Sourcepub fn normalize_file(&self, path: &Path) -> Result<usize>
pub fn normalize_file(&self, path: &Path) -> Result<usize>
Normalize line endings in a single file. Returns the number of lines changed.
Auto Trait Implementations§
impl Freeze for EndingsNormalizer
impl RefUnwindSafe for EndingsNormalizer
impl Send for EndingsNormalizer
impl Sync for EndingsNormalizer
impl Unpin for EndingsNormalizer
impl UnsafeUnpin for EndingsNormalizer
impl UnwindSafe for EndingsNormalizer
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