pub enum LineBreak {
None,
Newline,
CRLF,
}Expand description
The type of line break between each record that should be inserted or skipped while reading.
Variants§
Implementations§
Source§impl LineBreak
impl LineBreak
Sourcepub fn byte_width(&self) -> usize
pub fn byte_width(&self) -> usize
The width in bytes of the given line break.
§Example
use fixed_width::LineBreak;
let no_linebreak = LineBreak::None;
let newline_linebreak = LineBreak::Newline;
let crlf_linebreak = LineBreak::CRLF;
assert_eq!(no_linebreak.byte_width(), 0);
assert_eq!(newline_linebreak.byte_width(), 1);
assert_eq!(crlf_linebreak.byte_width(), 2);Trait Implementations§
impl StructuralPartialEq for LineBreak
Auto Trait Implementations§
impl Freeze for LineBreak
impl RefUnwindSafe for LineBreak
impl Send for LineBreak
impl Sync for LineBreak
impl Unpin for LineBreak
impl UnwindSafe for LineBreak
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