pub enum HtmlToken {
StartTag {
name: String,
attrs: Vec<HtmlAttr>,
self_closing: bool,
span: Span,
},
EndTag {
name: String,
span: Span,
},
Text {
text: String,
span: Span,
},
Brace {
inner: String,
span: Span,
},
}Expand description
One flat token of a view body.
Variants§
StartTag
<name attr…> or <name …/>. self_closing is true for an explicit /> AND for
every HTML void element (<br>, <input>, …), which never has an end tag.
EndTag
</name>.
Text
A text run with character references decoded and whitespace kept VERBATIM.
Brace
A {…} group in text position: inner is the text between the braces.
Trait Implementations§
impl Eq for HtmlToken
impl StructuralPartialEq for HtmlToken
Auto Trait Implementations§
impl Freeze for HtmlToken
impl RefUnwindSafe for HtmlToken
impl Send for HtmlToken
impl Sync for HtmlToken
impl Unpin for HtmlToken
impl UnsafeUnpin for HtmlToken
impl UnwindSafe for HtmlToken
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.