Expand description
Compile-time checked markup and derive macros for the rich Rust port.
Use these through rs-rich-ext’s macros feature: it re-exports them and
supplies the runtime they expand to (rich_ext::__private, rich_ext::derive).
Markup and styles are checked with the core’s own parsers, so a literal the macro accepts is one the runtime accepts, with one deliberate addition: the macros also reject unknown style names and unclosed tags, which the runtime renders silently as no-ops.
Macros§
- markup
- Check a markup literal at compile time and return it as
&'static str. Acceptskeys[...]before the literal, asrichf!does. - richf
- A
Textfrom checked markup withformat!-style placeholders. - style
- A
Styleparsed at compile time:style!("bold red on white"). - theme_
key - A theme key checked against the default theme:
theme_key!("repr.number")expands to the&'static str.
Attribute Macros§
- inspect
- Record an inherent
implblock’s methods forrich_ext::inspect: eachfn’s name, signature as written, doc comment, and whether it ispuborasync. Mark the type#[inspect(methods)]to list them; one block per type.#[inspect(skip)]on a method leaves it out.