pub enum TextToken<'a> {
Literal(&'a str),
Expr(&'a str),
MarkupOpen {
name: &'a str,
properties: Vec<(&'a str, &'a str)>,
},
MarkupClose {
name: &'a str,
},
MarkupSelfClose {
name: &'a str,
properties: Vec<(&'a str, &'a str)>,
},
}Expand description
A token produced by scanning text that may contain {expr} and [markup] syntax.
Variants§
Literal(&'a str)
A literal run of text with no substitution or markup.
Expr(&'a str)
The source text between { and }.
MarkupOpen
An opening markup tag: [name] or [name key=val …].
Fields
MarkupClose
A closing markup tag: [/name].
MarkupSelfClose
A self-closing markup tag: [name /] or [name key=val … /].
Trait Implementations§
impl<'a> Eq for TextToken<'a>
impl<'a> StructuralPartialEq for TextToken<'a>
Auto Trait Implementations§
impl<'a> Freeze for TextToken<'a>
impl<'a> RefUnwindSafe for TextToken<'a>
impl<'a> Send for TextToken<'a>
impl<'a> Sync for TextToken<'a>
impl<'a> Unpin for TextToken<'a>
impl<'a> UnsafeUnpin for TextToken<'a>
impl<'a> UnwindSafe for TextToken<'a>
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<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.