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§
fn struct_docs_raw() -> Vec<&'static str>
fn field_docs_raw() -> Vec<Vec<&'static str>>
Sourcefn field_types() -> Vec<&'static str>
fn field_types() -> Vec<&'static str>
Returns all struct field types, ex. Option<String>
Sourcefn field_names() -> Vec<&'static str>
fn field_names() -> Vec<&'static str>
Returns all struct field names
Provided Methods§
Sourcefn struct_docs() -> Vec<&'static str>
fn struct_docs() -> Vec<&'static str>
Returns all docstrings of the struct itself
Sourcefn field_docs() -> Vec<Vec<&'static str>>
fn field_docs() -> Vec<Vec<&'static str>>
Returns all docstrings of each field, each line is a separate string
Sourcefn commented_fields() -> String
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.