pub struct Mount {
pub mem: String,
pub schema: Option<SchemaRef>,
pub storage: MountStorage,
pub capability: MountCapability,
pub lifecycle: MountLifecycle,
pub cross_linkable: bool,
pub migration_target: Option<SchemaRef>,
}Expand description
A single mem attachment in a Workspace. One mount = one
mem. The schema pin is on the mount because per-mem schema
resolution is fixed in code (local-storage → built-in → registry,
with the storage layer owning where “local” lives — see the
glossary’s Schema entry); the mount carries which schema this
mem expects, the backend resolves where the YAMLs come from.
Fields§
§mem: StringOperator-facing mem name within this workspace.
schema: Option<SchemaRef>Optional expectation assertion about this mem’s schema pin
(exact <name>@<version>). The authoritative pin is the mem’s
own MemConfig.schema on its storage backend; boot/load
resolve from there. This field is a workspace-local cross-check —
useful for foreign or read-only mounts. None means “assert
nothing, trust the backend config”. When Some and mismatching
the config pin, loading surfaces a SchemaPinMismatch finding
naming both values; neither is silently preferred. Resolution
falls back to this value only when the backend config carries no
pin.
storage: MountStorageBackend-specific reference to the mem’s content.
capability: MountCapabilityRead-only or writable attachment.
lifecycle: MountLifecycleEager (open the backend at engine start) or lazy (defer to
first read). V1 runtime treats every mount as Eager; the
Lazy slot is reserved for archive backends that should not
unzip at boot.
cross_linkable: boolWhether other mounts in the same workspace may form cross-mem edges into this mount. Workspace-level cross-mem permission policy can override.
migration_target: Option<SchemaRef>In-flight schema migration target. Some(target) puts the
mem in dual-pin state: writes validate against target
(the engine’s effective validation schema), reads stay
permissive, and schema remains the settled pin until every
entity is integral against the target — then the atomic
switch sets schema = target and clears this field in one
workspace-store write. Persisted so a long migration is
resumable across engine restarts.
Implementations§
Source§impl Mount
impl Mount
Sourcepub fn mem_path(&self) -> Option<String>
pub fn mem_path(&self) -> Option<String>
Hierarchical organisational path for this mount, or None for
flat layout / non-hierarchical storage. Mirrors the
MemCreateParams.path create-side input — at delete time the
lifecycle candidate composes as <mem_path>/<name> (or
<name> alone when None) to match the create-side rule.
Derivation: MountStorage::GitBranch carries the path in its
branch field. Tolerates both fully-qualified
refs/heads/<mem_path>/<mem> (the shape create_mem
produces) and bare <mem_path>/<mem> (the shape
mounts.json operator-edited entries carry) — full’s
instantiate_full_backend already normalises both forms. Strip
the optional refs/heads/ prefix and the trailing <mem>
leaf. Folder / Archive carry no hierarchical path on the
storage variant — runtime callers that know the create-time
path plumb it directly into the router via
Engine::register_writable_mem.
Trait Implementations§
impl Eq for Mount
impl StructuralPartialEq for Mount
Auto Trait Implementations§
impl Freeze for Mount
impl RefUnwindSafe for Mount
impl Send for Mount
impl Sync for Mount
impl Unpin for Mount
impl UnsafeUnpin for Mount
impl UnwindSafe for Mount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more