pub enum CoreCommands {
Validate {
file: String,
strict: bool,
lenient: bool,
},
Format {
file: String,
output: Option<String>,
check: bool,
ditto: bool,
with_counts: bool,
},
Lint {
file: String,
format: String,
warn_error: bool,
},
Inspect {
file: String,
verbose: bool,
},
Stats {
file: String,
tokens: bool,
},
}Expand description
Core HEDL commands.
These commands provide the essential functionality for working with HEDL files: validation, formatting, linting, inspection, and statistics.
§Commands
- Validate: Check HEDL syntax and semantic correctness
- Format: Convert to canonical form with optional optimizations
- Lint: Check for best practices and style issues
- Inspect: Visualize internal structure
- Stats: Analyze size and token efficiency
Variants§
Validate
Validate a HEDL file
Checks the syntax and semantic correctness of a HEDL file. In strict mode, all references must resolve to existing entities.
Fields
Format
Format a HEDL file to canonical form
Reformats a HEDL file to its canonical representation. Supports various formatting options including ditto optimization and automatic count hints.
Fields
Lint
Lint a HEDL file for best practices
Analyzes a HEDL file for style issues, best practices violations, and potential problems. Can output results in text or JSON format.
Fields
Inspect
Print parsed structure (debug)
Displays the internal structure of a HEDL file as a tree, useful for debugging and understanding how HEDL parses the file.
Stats
Show size/token savings vs other formats
Analyzes a HEDL file and compares its size and token count against equivalent representations in JSON, YAML, XML, CSV, and Parquet.
Implementations§
Trait Implementations§
Source§impl FromArgMatches for CoreCommands
impl FromArgMatches for CoreCommands
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 CoreCommands
impl Subcommand for CoreCommands
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 CoreCommands
impl RefUnwindSafe for CoreCommands
impl Send for CoreCommands
impl Sync for CoreCommands
impl Unpin for CoreCommands
impl UnwindSafe for CoreCommands
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> 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