Expand description
Race-safe bounded file reads.
The module name is retained for source compatibility, but project files are
intentionally no longer memory-mapped. A repository file can be truncated
by another editor or agent at any time; copying through Read keeps those
races inside Rust’s safe I/O model.
Structs§
- Shareable
Map - Cloneable immutable file snapshot retained under the historical API name.
Constants§
- DIRECT_
READ_ THRESHOLD - Legacy threshold retained for callers that used the old tuning constants.
- MAX_
MMAP_ SIZE - Historical single-map ceiling, now the maximum
ShareableMapsnapshot size. - MAX_
SEGMENTED_ MMAP_ SIZE - Legacy segmented-map ceiling retained for API compatibility.
- SEGMENT_
SIZE - Legacy map segment size retained for API compatibility.
Functions§
- process_
text_ file_ parallel - Process UTF-8 lines in parallel once the immutable snapshot exceeds 1 MB.
- read_
file_ optimized - Read a complete file through bounded, race-detecting safe I/O.
- read_
file_ segment - Read a specific byte segment through bounded, race-detecting safe I/O.
- read_
file_ segment_ to_ string - Read one UTF-8 byte segment through the bounded snapshot reader.
- read_
file_ to_ string - Read a UTF-8 file through the bounded snapshot reader.