pub enum LineEnding {
Lf,
CrLf,
}Expand description
How the lines of a delimited file end.
Measured, never assumed: LineEnding::of reads it off the file’s own
bytes, and a file with no line break at all reads as LineEnding::Lf,
which is what every engine reads by default.
Variants§
Lf
A newline alone, \n: every system but Windows.
CrLf
A carriage return and then a newline, \r\n: a file written on
Windows.
Implementations§
Source§impl LineEnding
impl LineEnding
Sourcepub fn of(text: &[u8]) -> Self
pub fn of(text: &[u8]) -> Self
How the lines of this text end, decided by its first line break.
The first break ends the header row, so it is written the way the rest
of the file is. Text with no newline at all is LineEnding::Lf.
Trait Implementations§
Source§impl Clone for LineEnding
impl Clone for LineEnding
impl Copy for LineEnding
Source§impl Debug for LineEnding
impl Debug for LineEnding
Source§impl Default for LineEnding
impl Default for LineEnding
impl Eq for LineEnding
Source§impl Hash for LineEnding
impl Hash for LineEnding
Source§impl PartialEq for LineEnding
impl PartialEq for LineEnding
impl StructuralPartialEq for LineEnding
Auto Trait Implementations§
impl Forget for LineEnding
impl Freeze for LineEnding
impl Move for LineEnding
impl RefUnwindSafe for LineEnding
impl Send for LineEnding
impl Sync for LineEnding
impl Unpin for LineEnding
impl UnsafeUnpin 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