Enum bbscope::MatchType

source ·
pub enum MatchType {
    Passthrough,
    Open(TagInfo),
    Close(TagInfo),
    BlockTransform(&'static str),
    DirectReplace(&'static str),
}
Expand description

While “TagType” determines how the tag functions at a lower level (such as how it handles arguments), this determines how the whole block functions on a greater level. They define how scopes and whole blocks of text move into the output. This still operates on the idea of “tags” though

Variants§

§

Passthrough

Pass this junk right out as-is

§

Open(TagInfo)

The match should expect an open tag, which increases scope and performs open scope rules

§

Close(TagInfo)

The match should expect a closing tag, which decreases scope and performs close scope rules

§

BlockTransform(&'static str)

Note: you can use BlockTransform to craft many kinds of generic matching, if it can use regex! It just won’t be part of the scoping rules! IE it should be an entire block! Also, the match will ALWAYS be html escaped first!

§

DirectReplace(&'static str)

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.