Expand description
Core StructFS: Semantic Store Layer
This layer adds meaning to the raw bytes of LLStructFS:
Path: Validated path with Unicode identifier componentsValue: Parsed tree structure (the “struct” in StructFS)Record: Either raw bytes or parsed ValueFormat: 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.
- Core
ToLL - 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.
- LLTo
Core - Adapts an LL store to the Core Store interface.
- Lazy
Record - A record with lazy parsing. Thread-safe.
- Masked
- A store that redacts sensitive paths on read.
- Memory
Store - 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.
- Path
Component - A single validated path component.
- Read
Only - A read-only view of a store: reads pass through, writes are rejected
with a
PermissionDeniederror. - 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.
- Type
Descriptor - Describes a field’s type within a schema.
- Type
Info - Type information for a referenced value.
Enums§
- Codec
Error Kind - Stable semantic categories for value conversion and codec failures.
- Codec
Operation - Whether a codec error occurred during encoding or decoding.
- Error
- Errors at the Core layer.
- LLError
- Errors at the LL (low-level) layer.
- Path
Error - Errors related to path parsing and validation.
- Path
Pattern - 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.