csv_diff/
lib.rs

1/*!
2Find the difference between two CSVs - with ludicrous speed!🚀
3
4`csv-diff` finds the difference between two CSVs.
5It is the fastest CSV-diffing library in the world!
6Comparing two 1,000,000 rows x 9 columns CSVs takes __under 600ms__ (when using [raw bytes](csv_diff::CsvByteDiffLocal::diff)).
7It is *thread-pool-agnostic*, meaning you can provide your own existing thread-pool
8or you can use the default [rayon thread-pool](https://docs.rs/rayon/1.5.0/rayon/struct.ThreadPool.html)
9that is used in this crate.
10
11# Use Case
12This crate should be used on CSV data that has some sort of *primary key* for uniquely identifying a record.
13It is __not__ a general line-by-line diffing crate.
14You can imagine dumping a database table in CSV format from your *test* and *production* system and comparing it
15with each other to find differences.
16
17# Overview
18The most important types you will use are:
191. [`CsvByteDiffLocal`](csv_diff::CsvByteDiffLocal) for comparing two CSVs byte-wise in a blocking fashion and getting the result as [`DiffByteRecords`](diff_result::DiffByteRecords).
202. [`CsvByteDiff`](csv_diff::CsvByteDiff) for comparing two CSVs byte-wise lazily and getting the result as an [`Iterator`](diff_result::DiffByteRecordsIterator).
21*/
22
23#![forbid(unsafe_code)]
24
25pub mod csv;
26pub mod csv_diff;
27mod csv_hash_comparer;
28pub mod csv_headers;
29// TODO: try to make it more private
30pub mod csv_hash_receiver_comparer;
31pub mod csv_hash_task_spawner;
32mod csv_hasher;
33pub mod csv_parse_result;
34mod csv_parser_hasher;
35pub mod diff_result;
36pub mod diff_row;
37mod thread_scope_strategy; // TODO: do we really need this?
38
39#[doc(inline)]
40pub use ::csv::Result;