1
Fork 0

Add explanation of None vs Some("")

This commit is contained in:
Rune Tynan 2021-01-20 17:52:52 -05:00
parent 76511a7a71
commit 811fa59db0
No known key found for this signature in database
GPG key ID: 7ECC932F8B2C731E

View file

@ -68,7 +68,8 @@ pub struct Item {
/// By default all documented items are public, but you can tell rustdoc to output private items /// By default all documented items are public, but you can tell rustdoc to output private items
/// so this field is needed to differentiate. /// so this field is needed to differentiate.
pub visibility: Visibility, pub visibility: Visibility,
/// The full markdown docstring of this item. /// The full markdown docstring of this item. Absent if there is no documentation at all,
/// Some("") if there is some documentation but it is empty (EG `#[doc = ""]`).
pub docs: Option<String>, pub docs: Option<String>,
/// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs /// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs
pub links: FxHashMap<String, Id>, pub links: FxHashMap<String, Id>,