pub enum MemAction {
Init(InitArgs),
Unregister(UnregisterArgs),
Delete(DeleteArgs),
SetVersion(SetVersionArgs),
SetSchema(SetSchemaArgs),
SetDescription(SetDescriptionArgs),
SetSyncState(SetSyncStateArgs),
List(ListArgs),
}Expand description
Subcommands under memstead mem.
Variants§
Init(InitArgs)
Register a new mem via the engine’s mem-management orchestrator.
Unregister(UnregisterArgs)
Router-only removal — unregisters the mem from the workspace
but leaves its stored content in place for archive workflows.
Cross-mem grants pointing at the unregistered mem stay valid
(the data they rely on survives); a follow-up memstead mem init <same name> re-attaches against the preserved storage. Refuses
with MEM_HAS_INCOMING_REFS when entities in other mems still
link into this one — remove those incoming cross-mem references
first (mirrors mem delete’s precondition).
Delete(DeleteArgs)
Storage-destroying removal — unregisters the mem AND deletes
its stored content. Refuses with MEM_REFERENCED_BY_POLICY
when any other writable mem has a cross_mem_links grant
pointing at the target (revoke the grant first). For router-only
removal that keeps the storage, use memstead mem unregister.
SetVersion(SetVersionArgs)
Update a mem’s version field. The version is consumed by
memstead export --format mem to stamp the archive filename and
the .mem archive’s published config. version is seeded at
init (0.1.0); bump via this command before publishing.
SetSchema(SetSchemaArgs)
Set a mem’s schema pin — the integrity-driven schema-migration trigger. Already-integral mems switch immediately; otherwise the mem enters dual-pin migration (writes validate against the target) and the response lists the non-integral entities. Re-issue after repairing to complete the switch.
SetDescription(SetDescriptionArgs)
Set a mem’s one-line description — embedded in .mem archive
exports and surfaced on the registry card at publish time. An
empty string clears the field. Set it before memstead export /
memstead publish so the shared archive carries its card text.
SetSyncState(SetSyncStateArgs)
Set (or clear) one opaque sync-state token in a mem’s config —
the ingest layer’s durable “last synced source state” baseline.
<KEY> and <TOKEN> are opaque to the engine (the ingest layer
keys per (ingest, facet) and owns the token’s meaning). An
empty <TOKEN> clears the key. Written into the per-mem config
and surfaced verbatim on memstead workspace dump.
List(ListArgs)
Enumerate every mounted mem in the workspace with its
schema pin, version, entity count, and capability (writable
vs read-only). Markdown by default; pass --json (root flag)
for the structured envelope.
Trait Implementations§
Source§impl FromArgMatches for MemAction
impl FromArgMatches for MemAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for MemAction
impl Subcommand for MemAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for MemAction
impl RefUnwindSafe for MemAction
impl Send for MemAction
impl Sync for MemAction
impl Unpin for MemAction
impl UnsafeUnpin for MemAction
impl UnwindSafe for MemAction
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> 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
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