Skip to main content

DocumentedEnum

Trait DocumentedEnum 

Source
pub trait DocumentedEnum {
    // Required methods
    fn enum_docs_raw() -> Vec<&'static str>;
    fn variant_docs_raw() -> Vec<Vec<&'static str>>;
    fn variant_names() -> Vec<&'static str>;

    // Provided methods
    fn enum_docs() -> Vec<&'static str> { ... }
    fn variant_docs() -> Vec<Vec<&'static str>> { ... }
    fn commented_variants() -> String { ... }
}

Required Methods§

Source

fn enum_docs_raw() -> Vec<&'static str>

Source

fn variant_docs_raw() -> Vec<Vec<&'static str>>

Source

fn variant_names() -> Vec<&'static str>

Returns all variants of the enum

Provided Methods§

Source

fn enum_docs() -> Vec<&'static str>

Returns all docstrings of the enum itself

Source

fn variant_docs() -> Vec<Vec<&'static str>>

Returns all docstrings of each variant, each line is a separate string

Source

fn commented_variants() -> String

Returns a string shownig all variants and their docstrings

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§