pub struct FieldStore { /* private fields */ }Implementations§
Source§impl FieldStore
impl FieldStore
Sourcepub fn open(root: impl AsRef<Path>) -> Result<Self>
pub fn open(root: impl AsRef<Path>) -> Result<Self>
Create or open a field store rooted at root (the filesystem backend).
Sourcepub fn io(&self) -> &IoCounters
pub fn io(&self) -> &IoCounters
The physical-I/O counters shared by this store and its seed substrate.
Every descriptor/manifest/index/seed read made through any handle derived from this store is attributed here; an observation snapshots it before and after to report its own physical bytes (review fix #1).
Sourcepub fn cache(&self) -> Result<DerivedCache>
pub fn cache(&self) -> Result<DerivedCache>
Open the disposable derived observation cache (11.8) under this store.
The cache is never normative: it can always be deleted and observations remain correct by recomputation (ADR-0027).
Sourcepub fn sync(&self) -> Result<()>
pub fn sync(&self) -> Result<()>
Make every acknowledged write power-durable before the handle is dropped.
The EntropyFS engine acks a put_blob at rename but does not barrier, so a
fresh open in another process can miss an unpublishied epoch. Calling this
after a mutation closes that gap. The filesystem backend writes atomically
(tmp -> fsync -> rename) and needs no barrier.
Sourcepub fn put_descriptor(&mut self, bytes: &[u8]) -> Result<Id>
pub fn put_descriptor(&mut self, bytes: &[u8]) -> Result<Id>
Store a serialized .voldoc descriptor as a content-addressed blob.
Returns the blob’s Id (BLAKE3-256(bytes)), which is what the field
manifest binds. Idempotent.
Sourcepub fn get_descriptor(&self, id: &Id) -> Result<Vec<u8>>
pub fn get_descriptor(&self, id: &Id) -> Result<Vec<u8>>
Fetch a descriptor blob, verifying its content id.
Sourcepub fn put_field(&mut self, manifest: &FieldRoot) -> Result<FieldId>
pub fn put_field(&mut self, manifest: &FieldRoot) -> Result<FieldId>
Store a canonical field manifest.
Sourcepub fn get_field(&self, id: &FieldId) -> Result<FieldRoot>
pub fn get_field(&self, id: &FieldId) -> Result<FieldRoot>
Fetch a field manifest, verifying its content id and universe.
Sourcepub fn list_fields(&self) -> Result<Vec<FieldId>>
pub fn list_fields(&self) -> Result<Vec<FieldId>>
List every stored field manifest id.
The filesystem backend reads the field/ directory. The EntropyFS backend
declines with UnsupportedFeature: the engine exposes no per-blob
enumeration, so a manifest cannot be listed — but any manifest remains
openable by its FieldId (get_field).
Sourcepub fn ingest(
&mut self,
descriptor_bytes: &[u8],
limits: Limits,
) -> Result<FieldId>
pub fn ingest( &mut self, descriptor_bytes: &[u8], limits: Limits, ) -> Result<FieldId>
Ingest a serialized .voldoc descriptor as a new field.
Stage A (durable exact capture): store the descriptor blob and an exact
DocumentExact root node, then write the manifest. Deeper Stage-B
procedural nodes are added by crate::field::ingest.