Crate line_cardinality

Source
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
HashingLineCounter
Calculates the unique count and holds necessary state.
HashingLineCounterIntoIter
An owned iter over report entries.
HashingLineCounterIter
A borrowing iter over report entries.
HyperLogLog
Estimates the unique count and holds necessary state.

Enums§

ErrorCause
Contains the cause of an Error

Traits§

CountUnique
Functionality to count total unique lines.
EmitLines
Functionality to emit lines from a CountUnique
Increment
A type that can count occurrences of a line
ReportUnique
Functionality to count occurrences of each line

Type Aliases§

LineCounter
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.