pub struct Conditional<'a> {
pub condition: Condition<'a>,
pub then_fields: Vec<Field<'a>>,
pub then_deps: Vec<Dependency<'a>>,
pub else_fields: Vec<Field<'a>>,
pub else_deps: Vec<Dependency<'a>>,
pub then_conditionals: Vec<Conditional<'a>>,
pub else_conditionals: Vec<Conditional<'a>>,
pub cst_node: NodeId,
}Expand description
A conditional block (if/elif with optional else) inside a component.
Fields§
§condition: Condition<'a>The parsed condition.
then_fields: Vec<Field<'a>>Fields in the then-branch.
then_deps: Vec<Dependency<'a>>Dependencies in the then-branch.
else_fields: Vec<Field<'a>>Fields in the else-branch.
else_deps: Vec<Dependency<'a>>Dependencies in the else-branch.
then_conditionals: Vec<Conditional<'a>>Nested conditionals in the then-branch.
else_conditionals: Vec<Conditional<'a>>Nested conditionals in the else-branch.
cst_node: NodeIdBack-reference to the CST conditional node.
Trait Implementations§
Source§impl<'a> Clone for Conditional<'a>
impl<'a> Clone for Conditional<'a>
Source§fn clone(&self) -> Conditional<'a>
fn clone(&self) -> Conditional<'a>
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<'a> Debug for Conditional<'a>
impl<'a> Debug for Conditional<'a>
Source§impl<'a> PartialEq for Conditional<'a>
impl<'a> PartialEq for Conditional<'a>
Source§fn eq(&self, other: &Conditional<'a>) -> bool
fn eq(&self, other: &Conditional<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> Eq for Conditional<'a>
impl<'a> StructuralPartialEq for Conditional<'a>
Auto Trait Implementations§
impl<'a> Freeze for Conditional<'a>
impl<'a> RefUnwindSafe for Conditional<'a>
impl<'a> Send for Conditional<'a>
impl<'a> Sync for Conditional<'a>
impl<'a> Unpin for Conditional<'a>
impl<'a> UnsafeUnpin for Conditional<'a>
impl<'a> UnwindSafe for Conditional<'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