pub struct CountLines { /* private fields */ }
Available on crate features
csv
or json
only.Implementations§
Source§impl CountLines
impl CountLines
pub fn new(quote_char: Option<u8>, eol_char: u8) -> Self
Sourcepub fn analyze_chunk(&self, bytes: &[u8]) -> [LineStats; 2]
pub fn analyze_chunk(&self, bytes: &[u8]) -> [LineStats; 2]
Analyzes a chunk of CSV data.
Returns (newline_count, last_newline_offset, end_inside_string) twice, the first is assuming the start of the chunk is not inside a string, the second assuming the start is inside a string.
pub fn find_next(&self, bytes: &[u8], chunk_size: &mut usize) -> (usize, usize)
Auto Trait Implementations§
impl Freeze for CountLines
impl RefUnwindSafe for CountLines
impl Send for CountLines
impl Sync for CountLines
impl Unpin for CountLines
impl UnwindSafe for CountLines
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more