Skip to main content

Module segments

Module segments 

Source
Expand description

Segment access abstractions for layouts.

Layouts refer to byte ranges by SegmentId. A SegmentSource resolves those ids to buffer handles for readers, while a SegmentSink assigns ids when writers emit buffers. SegmentCache implementations can sit in front of sources to reuse segment bytes across scans.

Structs§

InstrumentedSegmentCache
Wrapper for SegmentCache that tracks its hit rate.
MokaSegmentCache
A SegmentCache based around an in-memory Moka cache.
NoOpSegmentCache
Segment cache implementation that never stores anything.
SegmentCacheSourceAdapter
SegmentSource wrapper that consults a SegmentCache before the underlying source.
SegmentId
Identifier for a single physical segment referenced by a layout.
SharedSegmentSource
A SegmentSource that allows multiple requesters to await the same underlying segment request.
TestSegments
A dummy in-memory implementation of a segment reader and writer.

Traits§

SegmentCache
Cache for individual segment byte buffers.
SegmentSink
Assigns segment ids and writes segment buffers during layout writing.
SegmentSource
Provides segment data to a crate::LayoutReader.

Type Aliases§

SegmentFuture
Static future resolving to a segment byte buffer.
SegmentSinkRef
Shared writer-side segment sink.