Expand description
Input structures that can be fed into an Engine
.
The engine itself is generic in the Input
trait declared here.
There are a couple of different built-in implementations, each
suitable for a different scenario. Consult the module-level
documentation of each type to determine which to use. Here’s a quick
cheat-sheet:
Input scenario | Type to use |
---|---|
memory based | BorrowedBytes |
memory based, take ownership | OwnedBytes |
file based | MmapInput |
Read based | BufferedInput |
Re-exports
pub use borrowed::BorrowedBytes;
pub use buffered::BufferedInput;
pub use mmap::MmapInput;
pub use owned::OwnedBytes;
Modules
- Borrows a slice of bytes of the input document.
- Acquires a
Read
instance and reads it in on-demand in a buffer. All of the bytes read are kept in memory. - Error types for the
input
module. - Uses
Mmap
to map a file into memory with kernel support. - Takes ownership of bytes of the input document.
Constants
- Global padding guarantee for all
Input
implementations. Iterating over blocks of at most this size is guaranteed to produce only full blocks.
Traits
- UTF-8 encoded bytes representing a JSON document that support block-by-block iteration and basic seeking procedures.
- A block of bytes of size
N
returned fromInputBlockIterator
. - An iterator over blocks of input of size
N
. Implementations MUST guarantee that the blocks returned fromnext
are exactly of sizeN
.