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 |
|---|---|
| file based | MmapInput |
| memory based | OwnedBytes |
| memory based, already aligned | BorrowedBytes |
Read based | BufferedInput |
Re-exports
pub use borrowed::BorrowedBytes;pub use buffered::BufferedInput;pub use owned::OwnedBytes;pub use mmap::MmapInput;
Modules
- Borrows a slice of bytes of the input document.
- Acquires a
Readinstance and reads it in on-demand in a buffer. All of the bytes read are kept in memory. - Error types for the
inputmodule. - Uses
Mmapto map a file into memory with kernel support. - Takes ownership of the input data.
Constants
- Global padding guarantee for all
Inputimplementations. 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
Nreturned fromInputBlockIterator. - An iterator over blocks of input of size
N. Implementations MUST guarantee that the blocks returned fromnextare exactly of sizeN.