pub enum Node {
StaticText(String),
Value(String),
RawValue(String),
Expression(TemplateExpression),
RawExpression(TemplateExpression),
Element(ElementNode),
Slot(SlotNode),
Include(TemplateSelector),
With {
bindings: Vec<TemplateBinding>,
children: Vec<Node>,
},
Conditional {
condition: ConditionExpression,
negated: bool,
children: Vec<Node>,
},
Each {
item: String,
collection: String,
children: Vec<Node>,
},
}Variants§
StaticText(String)
Value(String)
RawValue(String)
Expression(TemplateExpression)
RawExpression(TemplateExpression)
Element(ElementNode)
Slot(SlotNode)
Include(TemplateSelector)
With
Conditional
Each
Implementations§
Source§impl Node
impl Node
pub fn static_text(value: impl Into<String>) -> Self
pub fn value(key: impl Into<String>) -> Result<Self, TemplateModelError>
pub fn raw_value(key: impl Into<String>) -> Result<Self, TemplateModelError>
pub fn expression(expression: TemplateExpression) -> Self
pub fn raw_expression(expression: TemplateExpression) -> Self
pub fn include(selector: TemplateSelector) -> Self
pub fn with(bindings: Vec<TemplateBinding>, children: Vec<Node>) -> Self
pub fn conditional( condition: impl Into<String>, children: Vec<Node>, ) -> Result<Self, TemplateModelError>
pub fn conditional_literal(value: bool, children: Vec<Node>) -> Self
pub fn conditional_not( condition: impl Into<String>, children: Vec<Node>, ) -> Result<Self, TemplateModelError>
pub fn each( item: impl Into<String>, collection: impl Into<String>, children: Vec<Node>, ) -> Result<Self, TemplateModelError>
Trait Implementations§
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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