Expand description
Rustdoc writes aut two kinds of shared files:
- Static files, which are embedded in the rustdoc binary and are written with a
filename that includes a hash of their contents. These will always have a new
URL if the contents change, so they are safe to cache with the
Cache-Control: immutable
directive. They are written under the static.files/ directory and are written when –emit-type is empty (default) or contains “toolchain-specific”. If using the –static-root-path flag, it should point to a URL path prefix where each of these filenames can be fetched. - Invocation specific files. These are generated based on the crate(s) being
documented. Their filenames need to be predictable without knowing their
contents, so they do not include a hash in their filename and are not safe to
cache with
Cache-Control: immutable
. They include the contents of the –resource-suffix flag and are emitted when –emit-type is empty (default) or contains “invocation-specific”.
Structs§
- Alias
Serializable 🔒Impl - Final serialized form of the alias impl
- Aliased
Type 🔒 - Data for an aliased type.
- Aliased
Type 🔒Impl - The
impl_
contains data that’s used to figure out if an alias will work, and to generate the HTML at the end. - AllCrates 🔒
- Crate
Info 🔒 - Contains pre-rendered contents to insert into the CCI template
- Crates
Index 🔒 - Hierarchy 🔒
- Source files directory tree
- Implementor 🔒
- Part 🔒
- A piece of one of the shared artifacts for documentation (search index, sources, alias list, etc.)
- Parts
AndLocations 🔒 - Paths (relative to the doc root) and their pre-merge contents
- Search
Index 🔒 - Sources 🔒
- Trait
Alias 🔒 - Type
Alias 🔒 - Type
Impl 🔒Collector - Collect the list of aliased types and their aliases. https://github.com/search?q=repo%3Arust-lang%2Frust+[RUSTDOCIMPL]+type.impl&type=code
Enums§
- Crate
Info 🔒Version - Version for the format of the crate-info file.
Traits§
- CciPart 🔒
- Wrapper trait for
Part<T, U>
Functions§
- create_
parents 🔒 - Create all parents
- get_
path_ 🔒parts - hack_
get_ 🔒external_ crate_ names - Reads
crates.js
, which seems like the best place to obtain the list of externally documented crates if the index page was disabled when documenting the deps. - read_
template_ 🔒or_ blank - Returns a blank template unless we could find one to append to
- write_
not_ 🔒crate_ specific - Writes files that are written directly to the
--out-dir
, without the prefix from the current crate. These are the rendered cross-crate files that encode info from multiple crates (e.g. search index), and the static files. - write_
rendered_ 🔒cci - info from this crate and the –include-info-json’d crates
- write_
rendered_ 🔒cross_ crate_ info - write_
search_ 🔒desc - Write the search description shards to disk
- write_
shared 🔒 - write_
static_ 🔒files - Writes the static files, the style files, and the css extensions. Have to be careful about these, because they write to the root out dir.