pub enum ReplacementOp {
OpenElement {
qname: String,
attrs: Vec<AttrPair>,
float: Option<FloatKind>,
self_closing: bool,
},
CloseElement {
qname: String,
},
ProcessingInstruction {
qname: String,
attrs: Vec<AttrPair>,
},
AbsorbValue {
value: Value,
},
SetAttribute {
key: String,
value: AttrValue,
float: bool,
},
Text {
text: String,
},
Conditional {
test: Value,
then_ops: Vec<ReplacementOp>,
else_ops: Vec<ReplacementOp>,
},
}Expand description
One operation in a compiled replacement template.
Variants§
OpenElement
<q a='v' …> (or <q … /> when self_closing). float set when a ^/^^
prefix attaches here.
CloseElement
</q>.
ProcessingInstruction
<?q a='v' …?>.
AbsorbValue
#n / #name / &func(…) at content position — absorb the value.
SetAttribute
key='v' at content position — set the attribute on the current node.
float set when a ^ prefix attaches here.
Text
Literal text to absorb.
Conditional
?test(if)(else) — branches are op-lists.
Trait Implementations§
Source§impl Clone for ReplacementOp
impl Clone for ReplacementOp
Source§fn clone(&self) -> ReplacementOp
fn clone(&self) -> ReplacementOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReplacementOp
impl Debug for ReplacementOp
impl Eq for ReplacementOp
Source§impl PartialEq for ReplacementOp
impl PartialEq for ReplacementOp
impl StructuralPartialEq for ReplacementOp
Auto Trait Implementations§
impl Freeze for ReplacementOp
impl RefUnwindSafe for ReplacementOp
impl Send for ReplacementOp
impl Sync for ReplacementOp
impl Unpin for ReplacementOp
impl UnsafeUnpin for ReplacementOp
impl UnwindSafe for ReplacementOp
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