Skip to main content

Crate structfs_core_store

Crate structfs_core_store 

Source
Expand description

Core StructFS: Semantic Store Layer

This layer adds meaning to the raw bytes of LLStructFS:

  • Path: Validated path with Unicode identifier components
  • Value: Parsed tree structure (the “struct” in StructFS)
  • Record: Either raw bytes or parsed Value
  • Format: Hint about wire format for codecs

Use this layer for:

  • Application routing based on validated paths
  • Format-aware caching and transformation
  • Working with structured data

§Example

use structfs_core_store::{Reader, Writer, Record, Path, path};

fn read_user(store: &mut dyn Reader) -> Result<Option<Record>, structfs_core_store::Error> {
    store.read(&path!("users/123"))
}

Re-exports§

pub use path_trie::PathTrie;

Modules§

conformance
Conformance checks for the StructFS store conventions.
mount_store
A store that manages mounts through read/write operations.
overlay_store
OverlayStore: Route reads/writes to different stores based on path prefixes.
path_trie
A generic prefix trie keyed by path components.

Macros§

path
Compile-time validated path construction.

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
Cascade
A layered store: reads try the primary first, then fall back to the secondary; writes always go to the primary.
CoreToLL
Adapts a Core store to the LL Store interface.
Format
A hint about the wire format of raw bytes.
LLPath
An owned path at the LL level: a sequence of opaque byte components.
LLToCore
Adapts an LL store to the Core Store interface.
LazyRecord
A record with lazy parsing. Thread-safe.
Masked
A store that redacts sensitive paths on read.
MemoryStore
An in-memory tree store that implements the StructFS store conventions:
NoCodec
A codec that doesn’t support any formats.
Path
A validated path in StructFS.
PathComponent
A single validated path component.
ReadOnly
A read-only view of a store: reads pass through, writes are rejected with a PermissionDenied error.
Reference
A reference to a value at another path.
Rooted
A store confined to a subtree of another store.
Shared
A cloneable, shareable handle to a store.
TypeDescriptor
Describes a field’s type within a schema.
TypeInfo
Type information for a referenced value.

Enums§

CodecErrorKind
Stable semantic categories for value conversion and codec failures.
CodecOperation
Whether a codec error occurred during encoding or decoding.
Error
Errors at the Core layer.
LLError
Errors at the LL (low-level) layer.
PathError
Errors related to path parsing and validation.
PathPattern
A pattern over paths, matched component-wise — never byte-wise.
Record
A record that can be forwarded without parsing or parsed for inspection.
Value
A tree-shaped value that can be read from or written to a Store.

Traits§

Codec
Codec for converting between Value and bytes.
LLReader
Read bytes from a path.
LLStore
Combined read/write at the LL level.
LLWriter
Write bytes to a path.
Reader
Read records from paths.
Store
Combined read/write at the Core level.
Writer
Write records to paths.