diff --git a/module/move/wca/src/ca/formatter.rs b/module/move/wca/src/ca/formatter.rs index d528ef7f6d..905fed5b2d 100644 --- a/module/move/wca/src/ca/formatter.rs +++ b/module/move/wca/src/ca/formatter.rs @@ -5,14 +5,26 @@ mod private use iter_tools::Itertools; use ca::aggregator::Order; - /// - + /// Enum representing the format options for generating help content. + /// + /// `HelpFormat` defines the output format of help content, enabling the choice + /// between different styles, such as `Markdown` for structured text, or other + /// custom formats. #[ derive( Debug, Clone, PartialEq ) ] pub enum HelpFormat { + /// Generates help content in Markdown format, suitable for environments + /// that support Markdown rendering (e.g., documentation platforms, text editors). Markdown, + /// Represents an alternative format, customizable for different needs. Another, } + /// Generates Markdown-formatted help content based on a dictionary of terms and a specified order. + /// + /// The `md_generator` function takes a reference to a `Dictionary` and an `Order` to produce + /// a help document in Markdown format. This function is useful for generating structured, + /// readable help documentation suitable for Markdown-compatible platforms. pub fn md_generator( grammar : &Dictionary, order: Order ) -> String { let text = grammar.commands() diff --git a/module/move/wca/src/ca/help.rs b/module/move/wca/src/ca/help.rs index bfc8edbfe1..a2a7129f49 100644 --- a/module/move/wca/src/ca/help.rs +++ b/module/move/wca/src/ca/help.rs @@ -21,12 +21,16 @@ mod private // qqq : for Bohdan : it should transparent mechanist which patch list of commands, not a stand-alone mechanism + /// Enum `LevelOfDetail` specifies the granularity of detail for rendering or processing: #[ derive( Debug, Default, Copy, Clone, PartialEq, Eq ) ] pub enum LevelOfDetail { + /// No detail (default). #[ default ] None, + /// Basic level of detail. Simple, + /// High level of detail. Detailed, } @@ -64,6 +68,11 @@ mod private } // qqq : for Barsik : make possible to change properties order + /// Generates help content as a formatted string based on a given dictionary and options. + /// + /// This function takes a `Dictionary` of terms or commands and a `HelpGeneratorOptions` + /// struct to customize the help output, generating a user-friendly help message + /// or guide in `String` format. pub fn generate_help_content( dictionary : &Dictionary, o : HelpGeneratorOptions< '_ > ) -> String { struct Row diff --git a/module/move/wca/src/lib.rs b/module/move/wca/src/lib.rs index 7f42a20e14..2fcb2a8409 100644 --- a/module/move/wca/src/lib.rs +++ b/module/move/wca/src/lib.rs @@ -4,9 +4,6 @@ #![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "Readme.md" ) ) ] #![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "doc/", "wca.md" ) ) ] -#![ allow( where_clauses_object_safety ) ] // https://github.com/chris-morgan/anymap/issues/31 -// qqq : xxx : is it neccessary? - use mod_interface::mod_interface; pub mod ca;