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`.
15 lines
298 B
Rust
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;
|