Enum SubstitutionGroup

Source
pub enum SubstitutionGroup {
    Normal,
    Header,
    Verbatim,
    Pass,
    None,
    AttributeEntryValue,
    Custom(Vec<SubstitutionStep>),
}
Expand description

Each block and inline element has a default substitution group that is applied unless you customize the substitutions for a particular element.

SubstitutionGroup specifies the default or overridden substitution group to be applied.

Variants§

§

Normal

The normal substitution group is applied to the majority of the AsciiDoc block and inline elements except for specific elements described in the next sections.

§

Header

The header substitution group is applied to metadata lines (author and revision information) in the document header. It’s also applied to the values of attribute entries, regardless of whether those entries are defined in the document header or body. Only special characters, attribute references, and the inline pass macro are replaced in elements that fall under the header group.

You can use the inline pass macro in attribute entries to customize the substitution types applied to the attribute’s value.

§

Verbatim

Literal, listing, and source blocks are processed using the verbatim substitution group. Only special characters are replaced in these blocks.

§

Pass

No substitutions are applied to three of the elements in the pass substitution group. These elements include the passthrough block, inline pass macro, and triple plus macro.

The inline single plus and double plus macros also belong to the pass group. Only the special characters substitution is applied to these elements.

§

None

The none substitution group is applied to comment blocks. No substitutions are applied to comments.

§

AttributeEntryValue

The attribute entry value substitution group is applied to attribute values. Only special characters and attribute references are applied to these values.

§

Custom(Vec<SubstitutionStep>)

You can customize the substitutions applied to the content of an inline pass macro by specifying one or more substitution values. Multiple values must be separated by commas and may not contain any spaces. The substitution value is either the formal name of a substitution type or group, or its shorthand.

See Custom substitutions.

Trait Implementations§

Source§

impl Clone for SubstitutionGroup

Source§

fn clone(&self) -> SubstitutionGroup

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubstitutionGroup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SubstitutionGroup

Source§

fn eq(&self, other: &SubstitutionGroup) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for SubstitutionGroup

Source§

impl StructuralPartialEq for SubstitutionGroup

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.