pub struct EolInfo {
pub cr: usize,
pub lf: usize,
pub crlf: usize,
pub num_lines: usize,
}Expand description
File line information.
Fields§
§cr: usizeNumber of lines that end in carriage return
lf: usizeNumber of lines that end in line feeds
crlf: usizeNumber of lines that end in carriage return/line feed
num_lines: usizeTotal number of lines in the file (includes lines with no ending)
Implementations§
Source§impl EolInfo
impl EolInfo
Sourcepub fn get_common_eol(&self) -> EndOfLine
pub fn get_common_eol(&self) -> EndOfLine
Get the most common end-of-line based on the info.
pub fn num_endings(&self) -> usize
Trait Implementations§
impl Eq for EolInfo
impl StructuralPartialEq for EolInfo
Auto Trait Implementations§
impl Freeze for EolInfo
impl RefUnwindSafe for EolInfo
impl Send for EolInfo
impl Sync for EolInfo
impl Unpin for EolInfo
impl UnwindSafe for EolInfo
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