pub struct DerivedReference {
pub href: String,
pub text: String,
}Expand description
The destination a cross-reference target resolves to on its own, without consulting any catalog.
A target that names a document – another one (an inter-document cross
reference) or the current one – carries its own destination. The parser
derives it while substituting the reference, rewriting the path with the
relfileprefix, relfilesuffix, and outfilesuffix attributes in effect
at that point in the document.
This is a default: a ReferenceResolver that knows better (an
Antora-style host that resolves targets across a corpus) may still return
its own ResolvedReference, which takes precedence. This is what is used
when it does not.
Fields§
§href: StringThe hyperlink destination: the rewritten output path plus the target’s
fragment, if it had one (e.g. tigers.html#about), or # for a
reference to the current document.
text: StringThe display text to use when the cross-reference did not supply its own.
For another document this is its output path (e.g. tigers.html),
since that document’s reference text is not available to a
single-document parse. For the current document it is the document’s
reftext or, failing that, its title.
Trait Implementations§
Source§impl Clone for DerivedReference
impl Clone for DerivedReference
Source§fn clone(&self) -> DerivedReference
fn clone(&self) -> DerivedReference
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more