rust/src/librustdoc/html/mod.rs
Noah Lev 4bac09f58f rustdoc: Add UrlPartsBuilder
This is a type for efficiently and easily constructing the part of a URL
after the domain: `nightly/core/str/struct.Bytes.html`.

It allows simplifying some code and avoiding some allocations in the
`href_*` functions.

It will also allow making `Cache.paths` et al. use `Symbol` without
having to allocate `String`s in the `href_*` functions. `String`s would
be necessary otherwise because `Symbol::as_str()` returns `SymbolStr`,
whose `Deref<Target = str>` impl requires the `str` to not outlive it.
This is the primary motivation for the addition of `UrlPartsBuilder`.
2021-12-13 13:49:33 -08:00

15 lines
298 B
Rust

crate mod escape;
crate mod format;
crate mod highlight;
crate mod layout;
mod length_limit;
// used by the error-index generator, so it needs to be public
pub mod markdown;
crate mod render;
crate mod sources;
crate mod static_files;
crate mod toc;
mod url_parts_builder;
#[cfg(test)]
mod tests;