pub enum SchemaCommand {
New(NewArgs),
Validate(ValidateArgs),
Install(InstallArgs),
Migrate(MigrateArgs),
}Variants§
New(NewArgs)
Scaffold a new schema package at ./<name>/ — a manifest plus
one commented example type — that memstead schema validate
passes unmodified. Prints the follow-up commands that take the
package from folder to pinned mem.
Validate(ValidateArgs)
Validate a schema package directory (schema.yaml plus an
optional types/*.yaml) against the engine’s schema loader, as
the package you are AUTHORING — always read in the current
schema language, so retired keys (optional:,
propagating_relationships) refuse here by design. A package
already sealed under an older language can therefore be
refused by this command and still load: sealed content is read
under the generation it was sealed in, and that is the point of
sealing. Validate what you write, not what you installed.
Exits non-zero (SCHEMA_VALIDATION_FAILED) on any conformance
error, with the YAML line/column in the message where the parse
layer provides it.
Install(InstallArgs)
Install a schema package into the current folder workspace’s
.memstead/schemas/<name>@<version>/ so a mem can pin it.
<source> is a built-in name (planning, planning@0.1.0) or a
path to a package directory. Validates before copying; idempotent.
Repair note — engines 0.6.0 through 0.8.1 mis-stamped LEGACY packages as current-language at install, flipping their bare metadata fields from required to optional. If you installed a legacy package in that window, re-run the install with a fixed engine; the detection command and details are in the docs-site schema-authoring guide.
Migrate(MigrateArgs)
Rewrite an authoring package’s retired keys into the current
schema language — the keys schema validate refuses
(propagating_relationships, optional:, the retired examples:
list, the exemplar-relation to:/type: spelling) — by exactly
the translations the engine applies when it reads sealed
content. Dry run by default: prints one line per rewrite and
writes nothing. --write applies the rewrites in place, keeping
comments, key order and spacing. A package that carried
optional: was written when an absent key meant required, so
its fields declaring neither key get required: true — the
meaning they already have when sealed; delete the line where you
did not mean it. Never bumps version (whether a spelling
migration deserves one is yours to decide) and never touches a
sealed copy inside a mem. Exits non-zero (SCHEMA_MIGRATE_FAILED)
when a value cannot be rewritten mechanically, when the package
fails to load for a reason no retired key explains, or when the
rewrite would not reproduce the engine’s own translation.
Trait Implementations§
Source§impl Debug for SchemaCommand
impl Debug for SchemaCommand
Source§impl FromArgMatches for SchemaCommand
impl FromArgMatches for SchemaCommand
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 SchemaCommand
impl Subcommand for SchemaCommand
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 SchemaCommand
impl RefUnwindSafe for SchemaCommand
impl Send for SchemaCommand
impl Sync for SchemaCommand
impl Unpin for SchemaCommand
impl UnsafeUnpin for SchemaCommand
impl UnwindSafe for SchemaCommand
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