pub enum Tag {
Show 21 variants
Comment,
Punctuation,
Escape,
Strong,
Emph,
Link,
Raw,
Label,
Ref,
Heading,
ListMarker,
ListTerm,
MathDelimiter,
MathOperator,
Keyword,
Operator,
Number,
String,
Function,
Interpolated,
Error,
}
Expand description
A syntax highlighting tag.
Variants§
Comment
A line or block comment.
Punctuation
Punctuation in code.
Escape
An escape sequence or shorthand.
Strong
Strong markup.
Emph
Emphasized markup.
Link
A hyperlink.
Raw
Raw text.
Label
A label.
Ref
A reference to a label.
Heading
A section heading.
ListMarker
A marker of a list, enumeration, or term list.
ListTerm
A term in a term list.
MathDelimiter
The delimiters of an equation.
MathOperator
An operator with special meaning in an equation.
Keyword
A keyword.
Operator
An operator in code.
Number
A numeric literal.
String
A string literal.
Function
A function or method name.
Interpolated
An interpolated variable in markup or math.
Error
A syntax error.
Implementations§
Trait Implementations§
impl Copy for Tag
impl Eq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more