Skip to content

Commit 8ce6811

Browse files
committed
Add documentation here and there
1 parent 2341cab commit 8ce6811

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/clean/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ fn get_deprecation(cx: &DocContext, def_id: DefId) -> Option<Deprecation> {
7070
cx.tcx_opt().and_then(|tcx| stability::lookup_deprecation(tcx, def_id)).clean(cx)
7171
}
7272

73+
/// Used to create "cleaned-up" doc-specific objects from ast and hir objects
74+
///
75+
/// The most important implementor is `visit_ast::RustdocVisitor` whose clean
76+
/// method is called only once during a rustdoc execution, which will then parse
77+
/// all source files and generate a humungus `Crate` object which will contain
78+
/// EVERYTHING!!
7379
pub trait Clean<T> {
7480
fn clean(&self, cx: &DocContext) -> T;
7581
}

src/externalfiles.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ use std::path::{PathBuf, Path};
1515
use std::str;
1616

1717
#[derive(Clone)]
18+
/// Representation of an external template
1819
pub struct ExternalHtml{
20+
/// text to include in <head> section
1921
pub in_header: String,
22+
/// text to include before the generated docs
2023
pub before_content: String,
24+
/// text to include after the generated docs
2125
pub after_content: String
2226
}
2327

2428
impl ExternalHtml {
29+
/// The arguments are lists of paths; their contents are read into the respective fields
2530
pub fn load(in_header: &[String], before_content: &[String], after_content: &[String])
2631
-> Option<ExternalHtml> {
2732
match (load_external_files(in_header),

0 commit comments

Comments
 (0)