1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! A parallel CSV parser.
//!
//! An input is split into chunks that are parsed concurrently. Each
//! worker accumulates into its own state and a merge function folds the
//! per-worker states into the result. Fields are handed to the callback
//! as mutable slices into the parser's own buffer, so no per-record
//! allocation happens.
//!
//! ```no_run
//! use csveee::Parser;
//!
//! let mut parser = Parser::new();
//! let cities = parser.parse(
//! "data.csv",
//! Vec::new,
//! |acc, [_name, _age, city]| {
//! acc.push(city.to_string());
//! Ok(())
//! },
//! |states| states.concat(),
//! )?;
//! # Ok::<(), csveee::Error>(())
//! ```
//!
//! [`Parser::parse_slice`] does the same for bytes already in memory,
//! and [`Parser::parse_stream`] is the sequential fallback for sources
//! without random access. [`ParserBuilder`] configures the dialect
//! (delimiter, quoting, comments), the output mode ([`Variadic`] for
//! slices instead of fixed-size arrays, [`Bytes`] to skip UTF-8
//! validation) and the execution and I/O backends.
pub use ParserBuilder;
pub use ;
pub use ;
pub use RingBufSettings;
pub use ;
/// A `Result` with this crate's [`Error`] type.
pub type Result<T> = Result;