pub struct ReadMemSpec {
pub source: ReadMemSource,
pub cache_key: Option<String>,
}Expand description
One entry in MemConfig.read_mems — a read-only sealed mem
archive attached to the primary mem as reference material.
The engine resolves each entry to a cache file: when cache_key is
present, <mem_cache_dir>/<name>-<cache_key>.mem (content-addressed
— see ReadMemSpec::cache_key); otherwise the legacy
<mem_cache_dir>/<name>.mem.
Kept as a struct (rather than collapsing to a bare ReadMemSource)
so forward-compatible fields can be added without another schema break.
Fields§
§source: ReadMemSource§cache_key: Option<String>Content-address of the installed archive — a short hex digest of
the validator’s canonical bytes. The install path writes the cache
file at <cache>/<name>-<cache_key>.mem, so two distinct archives
sharing an internal mem name land in distinct files (no collision)
and re-installing identical bytes resolves to the same file (dedup).
None for legacy registrations written before content-addressing;
the loader then falls back to the bare <name>.mem path.
Trait Implementations§
Source§impl Clone for ReadMemSpec
impl Clone for ReadMemSpec
Source§fn clone(&self) -> ReadMemSpec
fn clone(&self) -> ReadMemSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more