Expand description
Acquires a Read
instance and reads it in on-demand in a buffer.
All of the bytes read are kept in memory.
Choose this implementation if:
- You have a
Read
source that might contain relatively large amounts of data. - You want to run the JSONPath query on the input and then discard it.
§Performance characteristics
This is the best choice for a relatively large read-once input that is not a file
(or when memory maps are not supported). It is faster than first reading all of
the contents and then passing them to BorrowedBytes
. It is, however,
slow compared to other choices. If you know the approximate length of input,
use the with_capacity
function to avoid
reallocating the internal buffers.
Structs§
- Buffered
Input - Input supporting a buffered read over a
Read
implementation. - Buffered
Input Block - Block returned from a
BufferedInputBlockIterator
. - Buffered
Input Block Iterator - Iterator over a
BufferedInput
.