Module rsonpath::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§

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 from InputBlockIterator.
  • An iterator over blocks of input of size N. Implementations MUST guarantee that the blocks returned from next are exactly of size N.