Expand description
On-disk formats for AFT’s indexes.
Everything AFT stores about a repository’s files lives in immutable
segment files: units keyed by file content, sorted lookup tables, and
posting lists. Readers fetch segment bytes with positioned reads through
one byte-budgeted BlockCache shared by every open segment, so memory
stays bounded and counted however many checkouts read the same data.
This crate knows nothing about AFT’s tools, sessions or configuration. It defines the formats and the code that writes, verifies and reads them.
Re-exports§
pub use cache::BlockCache;pub use cache::CacheStats;pub use family::Family;pub use family::FamilyError;pub use family::Snapshot;pub use family::WriteSession;pub use ids::CheckoutId;pub use ids::ContentKey;pub use ids::Digest128;pub use ids::FamilyId;pub use ids::Generation;pub use ids::SegmentId;pub use ids::WriterIncarnation;
Modules§
- cache
- One byte-budgeted cache of verified segment blocks, shared by every open segment.
- checkout
- A checkout’s state: which content each of its paths holds, and the evidence that lets a later bind trust that without reading the file.
- content
- Content records: everything parsing one file content yields, stored once per content and shared by every checkout and path that holds it.
- family
- A family’s files and the protocol that publishes and reclaims them.
- graph
- The call graph’s per-file sections in a segment.
- heap
- The heap bytes of in-memory structures, for AFT’s memory census.
- ids
- Identities that appear in stored data.
- postings
- Posting lists: for one term, the ordinals of the units that contain it in ascending order, each entry carrying the same fixed set of payload values.
- scan
- Building a checkout’s state from its working tree.
- segment
- The segment container: one immutable file holding sections of any plane.
- spill
- Budgeted stable external sorting of variable-size byte records.
- stat
- Stat evidence: what the filesystem says about a file, recorded when its content is read so that a later bind can trust the content without reading it again.
- sync
- Durable flushes shared by the index store and AFT’s other file writers.
- table
- Sorted tables stored inside segment sections, searched in place.
- text
- The text plane: a trigram index over every distinct file content of a family, shared by all of its checkouts.
- vector
- The vector plane: embeddings for meaning search, stored once per family and searched exactly.
Macros§
- heap_
bytes_ none - Implements
HeapBytesas zero for types that own nothing on the heap. - heap_
bytes_ of_ fields - Implements
HeapBytesfor a struct as the sum of its fields. Every field must be named: the struct is destructured without.., so a field added later fails to compile until it is listed here.