pub trait DocumentedVariants {
// Required method
fn get_variant_docs(&self) -> &'static str;
}Expand description
Adds an associated function get_variant_docs to
access the documentation on an enum variant.
The associated derive macro of this trait will error if any variant does not
have any doc comments. Use DocumentedVariantsOpt if this is undesirable.
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§
Sourcefn get_variant_docs(&self) -> &'static str
fn get_variant_docs(&self) -> &'static str
Get the documentation on this enum variant.