Expand description
line_cardinality provides utilities to count or estimate unique lines from input data. It can read from a
BufRead
(such as stdin) or a file using optimized file reading functions.
Note line_cardinality only supports newline (\n
) delimited input and does not perform any
UTF-8 validation: all lines are compared by byte value alone.
Examples of counting total distinct lines can be found in CountUnique
.
Examples of reporting occurrences of each distinct line can be found in ReportUnique
.
Structs§
- Error
- Errors returned by line_cardinality
- Hashing
Line Counter - Calculates the unique count and holds necessary state.
- Hashing
Line Counter Into Iter - An owned iter over report entries.
- Hashing
Line Counter Iter - A borrowing iter over report entries.
- Hyper
LogLog - Estimates the unique count and holds necessary state.
Enums§
- Error
Cause - Contains the cause of an
Error
Traits§
- Count
Unique - Functionality to count total unique lines.
- Emit
Lines - Functionality to emit lines from a
CountUnique
- Increment
- A type that can count occurrences of a line
- Report
Unique - Functionality to count occurrences of each line
Type Aliases§
- Line
Counter - A
CountUnique
that does not track each line’s occurrence count, but is still useful for finding the total number of distinct lines in the input data.