Module input

Source
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 scenarioType to use
memory basedBorrowedBytes
memory based, take ownershipOwnedBytes
file basedMmapInput
Read basedBufferedInput

Re-exports§

pub use borrowed::BorrowedBytes;
pub use buffered::BufferedInput;
pub use mmap::MmapInput;
pub use owned::OwnedBytes;

Modules§

borrowed
Borrows a slice of bytes of the input document.
buffered
Acquires a Read instance and reads it in on-demand in a buffer. All of the bytes read are kept in memory.
error
Error types for the input module.
mmap
Uses Mmap to map a file into memory with kernel support.
owned
Takes ownership of bytes of the input document.

Constants§

MAX_BLOCK_SIZE
Global padding guarantee for all Input implementations. Iterating over blocks of at most this size is guaranteed to produce only full blocks.

Traits§

Input
UTF-8 encoded bytes representing a JSON document that support block-by-block iteration and basic seeking procedures.
InputBlock
A block of bytes of size N returned from InputBlockIterator.
InputBlockIterator
An iterator over blocks of input of size N. Implementations MUST guarantee that the blocks returned from next are exactly of size N.