pub struct RowCounter { /* private fields */ }Expand description
Tracker counting physical and deleted rows.
Implementations§
Source§impl RowCounter
impl RowCounter
Sourcepub unsafe fn set_deleted_rows<D>(&mut self, deleted_rows: D)
pub unsafe fn set_deleted_rows<D>(&mut self, deleted_rows: D)
Sourcepub fn add(self, other: Self) -> Self
pub fn add(self, other: Self) -> Self
Performs a saturating add if there are no deleted rows, otherwise performs a checked add.
§Panics
Panics if there are deleted rows and addition overflows.
Sourcepub fn num_rows(&self) -> PolarsResult<usize>
pub fn num_rows(&self) -> PolarsResult<usize>
Returns the number of rows after applying deletions. This returns an error if there are more deleted rows than physical rows.
Sourcepub fn num_rows_idxsize(&self) -> PolarsResult<IdxSize>
pub fn num_rows_idxsize(&self) -> PolarsResult<IdxSize>
Returns RowCounter::num_rows as a usize.
Sourcepub fn num_rows_idxsize_saturating(&self) -> PolarsResult<IdxSize>
pub fn num_rows_idxsize_saturating(&self) -> PolarsResult<IdxSize>
Saturates to IdxSize::MAX if conversion fails
Sourcepub fn num_physical_rows(&self) -> usize
pub fn num_physical_rows(&self) -> usize
Returns the number of rows physically present in the file.
pub fn num_physical_rows_idxsize_saturating(&self) -> IdxSize
Trait Implementations§
Source§impl Clone for RowCounter
impl Clone for RowCounter
Source§fn clone(&self) -> RowCounter
fn clone(&self) -> RowCounter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RowCounter
impl Debug for RowCounter
Source§impl Default for RowCounter
impl Default for RowCounter
Source§fn default() -> RowCounter
fn default() -> RowCounter
Returns the “default value” for a type. Read more
Source§impl PartialEq for RowCounter
impl PartialEq for RowCounter
impl Copy for RowCounter
impl StructuralPartialEq for RowCounter
Auto Trait Implementations§
impl Freeze for RowCounter
impl RefUnwindSafe for RowCounter
impl Send for RowCounter
impl Sync for RowCounter
impl Unpin for RowCounter
impl UnwindSafe for RowCounter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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