Crate regex_chunker
source ·Re-exports
pub use crate::err::RcErr;
Modules
- Error types returned by the various chunkers.
Structs
- The
ByteChunker
takes abytes::Regex
, wraps a byte source (that is, a type that implementsstd::io::Read
) and iterates over chunks of bytes from that source that are delimited by the regular expression. It operates very much likebytes::Regex::split
, except that it works on an incoming stream of bytes instead of a necessarily-already-in-memory slice. - The
StringChunker
operates like theByteChunker
, except instead of returningVec<u8>
s, it returnsStrings
. It also has an extra parameter of operation,Utf8FailureMode
, which controls how it reacts when reading data that is not valid UTF-8.
Enums
- Type for specifying a Chunker’s behavior upon encountering an error.
- Specify what the chunker should do with the matched text.
- Type for specifying a
StringChunker
’s behavior upon encountering non-UTF-8 data.