pub struct CountLines { /* private fields */ }Implementations§
Source§impl CountLines
impl CountLines
pub fn new( quote_char: Option<u8>, eol_char: u8, comment_prefix: Option<CommentPrefix>, ) -> CountLines
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.
If comment_prefix is not None the start of bytes must be at the start of a line (and thus not in the middle of a comment).
pub fn find_next(&self, bytes: &[u8], chunk_size: &mut usize) -> (usize, usize)
pub fn count_rows(&self, bytes: &[u8], is_eof: bool) -> (usize, usize)
pub fn count(&self, bytes: &[u8]) -> (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 UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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