Crate clipmdplus_macro
source ·Expand description
ClipMdPlus Macro Library
The macro crate clipmdplus_macro will have some of it’s macros removed. It exists to create a #[derive(clipboard_thingy, todo clarify…)] I’m learning this feature of RUST, beyond that many of these macros are useful. For example, using macro_rules! would be less restrictive.
use super::super::Name; use super::super::Deserialize_enum; use super::super::Serialize_enum; use super::super::ToString; use super::super::VariantName; use clipmdplus_macro::VariantName;
Macros
- doc todo CamelCase to_camel_case_impl
- doc todo ScreamingSnakeCase to_screaming_snake_case_impl
- doc todo SnakeCase
- csi 🔒duplicated mtermion macros: termion’s Create a CSI-introduced sequence.
- Derive a constant msequence (static) struct.
- termion’s Derive a CSI sequence struct. derive_csi_sequence!(“Change the cursor style to blinking block”, BlinkingBlock, “\x31 q”);
- derive_fn!(“Get user name.”, ACCT, “get_current_username()”);
- Derive a non-CSI msequence (static) struct. derive_str_sequence!(“Clear the entire screen.”, All, “2J”);
Structs
- NAME_MAP 🔒doc todo create_ser_arms
Enums
Functions
- doc todo create_de_arms
- doc todo create_ser_arms
- doc todo create_to_str_arms
- Variant to String conversion doc todo format_variant
- Checks that the passed input’s .data is an Enum and clones the ref
- Attribute to NamingStyle conversion doc todo get_naming_style_impl
- Takes a Variant, checks for the _ident, if “serde”, if the path _ident is “name” return the s Expr::Lit Variant Attributes ident(“serde”), ExprParen, parse_args, ExprAssign, ExprPath, ident, ExprLit
- CamelCase conversion
- SCREAMING_SNAKE_CASE conversion doc todo to_screaming_snake_case_impl
- SnakeCase conversion doc todo to_snake_case_impl
Derive Macros
- doc todo create_ser_arms
- Name
- doc todo NamingStyle get_naming_style
- doc todo create_ser_arms
- doc todo ToString to_string_enum
- VariantName