pub enum LineEnding {
Lf,
Cr,
Crlf,
}Expand description
Line endings for lines of output to standard out or standard error
Variants§
Lf
Linefeed line ending (\n or 0x0a).
This is the standard Linux ending
Cr
Carriage return (\r or 0x0d).
This is used for some MacOs programs
Crlf
Carriage Return + Line feed (\r\n or \0x0a\x0d).
This is the standard windows/internet ending
Implementations§
Source§impl LineEnding
impl LineEnding
Sourcepub fn is_line_feed(&self) -> bool
pub fn is_line_feed(&self) -> bool
Returns true if and only if self is a line feed
Sourcepub fn is_carriage_return(&self) -> bool
pub fn is_carriage_return(&self) -> bool
Returns true if and only if self is a carriage return
Sourcepub fn is_carriage_return_line_feed(&self) -> bool
pub fn is_carriage_return_line_feed(&self) -> bool
Returns true if and only if self is a carriage return followed by a line feed
Auto Trait Implementations§
impl Freeze for LineEnding
impl RefUnwindSafe for LineEnding
impl Send for LineEnding
impl Sync for LineEnding
impl Unpin for LineEnding
impl UnwindSafe for LineEnding
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