pub struct Document {Show 15 fields
pub source_path: PathBuf,
pub output_path: PathBuf,
pub title: String,
pub content: DocumentContent,
pub metadata: DocumentMetadata,
pub html: String,
pub source_mtime: DateTime<Utc>,
pub build_time: DateTime<Utc>,
pub cross_refs: Vec<CrossReference>,
pub toc: Vec<TocEntry>,
pub toctrees: Vec<ToctreeRecord>,
pub directive_records: Vec<DirectiveRecord>,
pub role_records: Vec<RoleRecord>,
pub labels: Vec<LabelRecord>,
pub registry: RegistryExport,
}Fields§
§source_path: PathBufSource file path
output_path: PathBufOutput file path
title: StringDocument title
content: DocumentContentDocument content (parsed)
metadata: DocumentMetadataDocument metadata
html: StringRendered HTML content
source_mtime: DateTime<Utc>Source file modification time
build_time: DateTime<Utc>Build time
cross_refs: Vec<CrossReference>Cross-references found in this document
toc: Vec<TocEntry>Table of contents
toctrees: Vec<ToctreeRecord>Toctree directives found in this document (wave 3: derived from the doctree at parse time; the build resolves/warns).
directive_records: Vec<DirectiveRecord>Directive occurrences for the validation system.
role_records: Vec<RoleRecord>Role occurrences for validation + nitpicky cross-ref checking.
labels: Vec<LabelRecord>Explicit hyperlink-target labels (docutils-normalized names).
registry: RegistryExportThe parse’s id/name registry snapshot (docutils document.nameids),
which the std-domain label harvest consumes. It rides the Document
— rather than being a separate read-phase value — so an incremental
cache hit, which skips parsing entirely, still has the real registry
instead of an empty stand-in. Deliberately not #[serde(default)]:
a cache entry written before this field existed fails to decode and
is re-parsed, which is the honest outcome.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more