Struct dejavu_parser::dejavu::TemplateIfNode
source · pub struct TemplateIfNode {
pub if_begin: IfBeginNode,
pub if_else: Option<IfElseNode>,
pub if_else_if: Vec<IfElseIfNode>,
pub if_end: IfEndNode,
pub span: Range<u32>,
}
Fields§
§if_begin: IfBeginNode
§if_else: Option<IfElseNode>
§if_else_if: Vec<IfElseIfNode>
§if_end: IfEndNode
§span: Range<u32>
Implementations§
source§impl TemplateIfNode
impl TemplateIfNode
<% if %>
then
<% else if %>
text
<% else %>
text
<% end %>
pub fn rights(&self) -> Vec<&TemplateRNode>
pub fn lefts(&self) -> Vec<&TemplateLNode>
pub fn conditions(&self) -> Vec<&ExpressionNode>
pub fn bodies(&self) -> Vec<&[ElementNode]>
Trait Implementations§
source§impl Clone for TemplateIfNode
impl Clone for TemplateIfNode
source§fn clone(&self) -> TemplateIfNode
fn clone(&self) -> TemplateIfNode
Returns a copy of the value. Read more
1.0.0 · 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 TemplateIfNode
impl Debug for TemplateIfNode
source§impl FromStr for TemplateIfNode
impl FromStr for TemplateIfNode
§type Err = YggdrasilError<DejavuRule>
type Err = YggdrasilError<DejavuRule>
The associated error which can be returned from parsing.
source§fn from_str(input: &str) -> Result<Self, YggdrasilError<DejavuRule>>
fn from_str(input: &str) -> Result<Self, YggdrasilError<DejavuRule>>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for TemplateIfNode
impl Hash for TemplateIfNode
Auto Trait Implementations§
impl RefUnwindSafe for TemplateIfNode
impl Send for TemplateIfNode
impl Sync for TemplateIfNode
impl Unpin for TemplateIfNode
impl UnwindSafe for TemplateIfNode
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