Skip to content

Derive macro for accessing your type's documentation at runtime.

License

Notifications You must be signed in to change notification settings

ImUrX/documented

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

documented

Derive macro for accessing your type's documentation at runtime

crates.io

Quick start

use documented::Documented;

fn main() {
    /// Nice.
    /// Multiple single-line doc comments are supported.
    ///
    /** Multi-line doc comments are supported too.
    Each line of the multi-line block is individually trimmed.
    Note the lack of spaces in front of this line.
    */
    #[doc = "Attribute-style documentation is supported too."]
    #[derive(Documented)]
    struct BornIn69;

    let doc_str = "Nice.
Multiple single-line doc comments are supported.

Multi-line doc comments are supported too.
Each line of the multi-line block is individually trimmed.
Note the lack of spaces in front of this line.

Attribute-style documentation is supported too.";
    assert_eq!(BornIn69::DOCS, doc_str);
}

About

Derive macro for accessing your type's documentation at runtime.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%