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§
sourcefn get_variant_docs(&self) -> Result<&'static str, Error>
fn get_variant_docs(&self) -> Result<&'static str, Error>
Get the documentation on this enum variant.