Skip to main content

DocumentedStruct

Trait DocumentedStruct 

Source
pub trait DocumentedStruct {
    // Required methods
    fn struct_docs_raw() -> Vec<&'static str>;
    fn field_docs_raw() -> Vec<Vec<&'static str>>;
    fn field_types() -> Vec<&'static str>;
    fn field_names() -> Vec<&'static str>;

    // Provided methods
    fn struct_docs() -> Vec<&'static str> { ... }
    fn field_docs() -> Vec<Vec<&'static str>> { ... }
    fn commented_fields() -> String { ... }
}

Required Methods§

Source

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

Source

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

Source

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

Returns all struct field types, ex. Option<String>

Source

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

Returns all struct field names

Provided Methods§

Source

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

Returns all docstrings of the struct itself

Source

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

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

Source

fn commented_fields() -> String

Returns string where each field is shown, its type and the 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§