Trait documented::DocumentedVariants

source ·
pub trait DocumentedVariants {
    // Required method
    fn get_variant_docs(&self) -> Result<&'static str, Error>;
}
Expand description

Adds an associated function get_variant_docs to access the documentation on an enum variant.

This trait and associated derive macro works on enums only. For structs and unions, use DocumentedFields instead.

For how to use the derive macro, see DocumentedVariants.

Required Methods§

source

fn get_variant_docs(&self) -> Result<&'static str, Error>

Get the documentation on this enum variant.

Implementors§