pub struct CountLines { /* private fields */ }Available on crate feature
polars-io only.Implementations§
Source§impl CountLines
impl CountLines
pub fn new( quote_char: Option<u8>, eol_char: u8, comment_prefix: Option<CommentPrefix>, ) -> CountLines
pub fn has_comment_prefix(&self) -> bool
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)
Available on non-crate feature
simd only.Trait Implementations§
Source§impl Clone for CountLines
impl Clone for CountLines
Source§fn clone(&self) -> CountLines
fn clone(&self) -> CountLines
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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