Skip to main content

Crate tree_display_derive

Crate tree_display_derive 

Source
Expand description

Procedural macro for deriving TreeDisplay.

This crate provides the #[derive(TreeDisplay)] macro, which generates tree representations of structs and enums. It should not be used directly; use the tree-display crate instead.

§Field Attributes

The following attributes can be applied to struct or enum variant fields:

  • #[tree(map)] - Apply a custom mapper from Context
  • #[tree(ignore)] - Exclude the field from the tree
  • #[tree(label = "...")] - Override the field’s display label
  • #[tree(unlabeled)] - Display the field without a label

Derive Macros§

TreeDisplay
Derives TreeDisplay for structs and enums.