Documentation: Difference between revisions

Content added Content deleted
(Add a Rust solution)
m (Add accidentally omitted word)
Line 1,458: Line 1,458:
=={{header|Rust}}==
=={{header|Rust}}==


Rust code is documented using the <code>rustdoc</code> tool included with the compiler (typically as <code>cargo doc</code>), which combines information from two sources: Automatic API documentation harvested from type signatures, and manual documentation provided by annotating the code with snippets of Markdown.
Rust code is documented using the <code>rustdoc</code> tool included with the compiler (typically invoked as <code>cargo doc</code>), which combines information from two sources: Automatic API documentation harvested from type signatures, and manual documentation provided by annotating the code with snippets of Markdown.


[https://doc.rust-lang.org/std/string/struct.String.html The Rust standard library documentation] serves as an example of what locally generated documentation looks like, but many people rely instead on the [https://docs.rs/ docs.rs] service, which generates and hosts documentation for crates published on [https://crates.io/ crates.io].
[https://doc.rust-lang.org/std/string/struct.String.html The Rust standard library documentation] serves as an example of what locally generated documentation looks like, but many people rely instead on the [https://docs.rs/ docs.rs] service, which generates and hosts documentation for crates published on [https://crates.io/ crates.io].