Skip to main content

Label

Trait Label 

Source
pub trait Label {
    // Required method
    fn label(&self) -> Cow<'static, str>;
}
Expand description

Human-readable label for an event variant.

Used by the test harness for event matching (e.g. chain.events().contains("KeyPress")), Mermaid diagram generation, and the Recorder monitor for JSON output.

Derive it automatically with #[derive(Label)] (requires the macros feature).

Required Methods§

Source

fn label(&self) -> Cow<'static, str>

Returns a human-readable label for this item.

Implementors§