pub struct Passthrough { /* private fields */ }Expand description
Records one inline passthrough (+++…+++, ++…++, $$…$$, pass:[…], or
an inline STEM macro) that the substitution pipeline extracted from a
block’s content before running the other substitutions, and restores
afterward.
The collection of these for a block is observable via
Content::passthroughs, analogous
to Asciidoctor’s internal @passthroughs array. It exposes, for each
entry, the stored (unescaped) source text and the resolved
subs that are applied to that text on restore.
Implementations§
Source§impl Passthrough
impl Passthrough
Sourcepub fn text(&self) -> &str
pub fn text(&self) -> &str
Returns the stored, unescaped source text of this passthrough – the text
that is substituted back in (after applying subs) when
the passthrough is restored.
This mirrors the :text of an entry in Asciidoctor’s @passthroughs
array.
Sourcepub fn subs(&self) -> &SubstitutionGroup
pub fn subs(&self) -> &SubstitutionGroup
Returns the resolved substitution group applied to this passthrough’s
text when it is restored, i.e. the ordered set of
substitution steps in effect for it.
For example, +++…+++ resolves to SubstitutionGroup::None (no
substitutions), while ++…++ and $$…$$ resolve to
SubstitutionGroup::Verbatim (special characters). This mirrors the
resolved :subs of an entry in Asciidoctor’s @passthroughs array.
Trait Implementations§
Source§impl Clone for Passthrough
impl Clone for Passthrough
Source§fn clone(&self) -> Passthrough
fn clone(&self) -> Passthrough
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more