pub enum ConversionCommands {
ToJson {
file: String,
output: Option<String>,
metadata: bool,
pretty: bool,
},
FromJson {
file: String,
output: Option<String>,
},
ToYaml {
file: String,
output: Option<String>,
},
FromYaml {
file: String,
output: Option<String>,
},
ToXml {
file: String,
output: Option<String>,
pretty: bool,
},
FromXml {
file: String,
output: Option<String>,
},
ToCsv {
file: String,
output: Option<String>,
headers: bool,
},
FromCsv {
file: String,
output: Option<String>,
type_name: String,
},
ToParquet {
file: String,
output: String,
},
FromParquet {
file: String,
output: Option<String>,
},
ToToon {
file: String,
output: Option<String>,
},
FromToon {
file: String,
output: Option<String>,
},
}Expand description
Format conversion commands.
These commands enable bidirectional conversion between HEDL and various data formats, making HEDL interoperable with existing tools and workflows.
§Supported Formats
- JSON: Compact and pretty printing, optional metadata
- YAML: Standard YAML format
- XML: Compact and pretty printing
- CSV: Tabular data with optional headers
- Parquet: Apache Parquet columnar format
§Design
All conversion commands follow a consistent pattern:
to-<format>: Convert HEDL to target formatfrom-<format>: Convert target format to HEDL
Variants§
ToJson
Convert HEDL to JSON
Converts a HEDL file to JSON format with optional pretty printing and metadata inclusion.
Fields
FromJson
Convert JSON to HEDL
Converts a JSON file to HEDL format. Foreign key relationships are automatically detected and converted to nested hierarchies.
ToYaml
Convert HEDL to YAML
Converts a HEDL file to YAML format.
FromYaml
Convert YAML to HEDL
Converts a YAML file to HEDL format.
ToXml
Convert HEDL to XML
Converts a HEDL file to XML format with optional pretty printing.
Fields
FromXml
Convert XML to HEDL
Converts an XML file to HEDL format.
ToCsv
Convert HEDL to CSV
Converts a HEDL file containing tabular data to CSV format. Works best with HEDL matrix lists.
Fields
FromCsv
Convert CSV to HEDL
Converts a CSV file to HEDL matrix list format.
Fields
ToParquet
Convert HEDL to Parquet
Converts a HEDL file to Apache Parquet columnar format. Requires an output file path (Parquet cannot write to stdout).
FromParquet
Convert Parquet to HEDL
Converts an Apache Parquet file to HEDL format.
ToToon
Convert HEDL to TOON
Converts a HEDL file to TOON format.
FromToon
Convert TOON to HEDL
Converts a TOON file to HEDL format.
Implementations§
Trait Implementations§
Source§impl FromArgMatches for ConversionCommands
impl FromArgMatches for ConversionCommands
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 ConversionCommands
impl Subcommand for ConversionCommands
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 ConversionCommands
impl RefUnwindSafe for ConversionCommands
impl Send for ConversionCommands
impl Sync for ConversionCommands
impl Unpin for ConversionCommands
impl UnwindSafe for ConversionCommands
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