pub struct XrefRenderParams<'a> {
pub target: &'a str,
pub provided_text: Option<&'a str>,
pub window: Option<&'a str>,
pub roles: &'a [String],
pub xrefstyle: Option<XrefStyle>,
pub derived: Option<&'a DerivedReference>,
pub resolved: Option<&'a ResolvedReference>,
}Expand description
Provides parameters for rendering a cross-reference.
Fields§
§target: &'a strThe raw, uninterpreted cross-reference target as written in the source.
provided_text: Option<&'a str>Explicit link text supplied in the cross-reference, if any.
window: Option<&'a str>Target window selection from a window attribute on the xref: macro
(e.g. _blank), or None. When _blank, the renderer also emits
rel="noopener", mirroring the link macro.
roles: &'a [String]Roles supplied via a role attribute on the xref: macro. Empty when
none were given.
xrefstyle: Option<XrefStyle>The cross-reference text style in effect for this reference (from the
xrefstyle= macro attribute or the document-wide xrefstyle). None
when xrefstyle is unset, in which case the target’s reference text is
used verbatim.
derived: Option<&'a DerivedReference>The destination the parser derived from the target itself, for a
target that names a document; None for a reference to an element
within the current document.
This is what the reference renders as when
resolved is None: such a target is not
unresolved, it simply resolves without the catalog’s help.
resolved: Option<&'a ResolvedReference>The resolved destination, or None if the reference is unresolved.
Trait Implementations§
Source§impl<'a> Clone for XrefRenderParams<'a>
impl<'a> Clone for XrefRenderParams<'a>
Source§fn clone(&self) -> XrefRenderParams<'a>
fn clone(&self) -> XrefRenderParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more