pub struct ControlRegion {
pub kind: ControlKind,
pub span: Span,
pub branches: Vec<ControlBranch>,
pub well_nested: bool,
}Expand description
A template control region ({{ if }}…{{ end }} and friends) with its
branch bodies. Container structure is decided by the visible YAML lines
alone, so a region’s branches hold exactly the nodes that opened and
closed while the branch was active.
Fields§
§kind: ControlKindKind of action that opened the region.
span: SpanFull source range from opener through closing action.
branches: Vec<ControlBranch>Conditional or fallback branches in source order.
well_nested: boolfalse when the region provably violates the well-nested assumption:
a container opened inside a branch was still open when the branch
ended (its children escape the region), or a branch boundary sat
mid-line inside YAML content. Downstream must treat such regions
conservatively.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControlRegion
impl RefUnwindSafe for ControlRegion
impl Send for ControlRegion
impl Sync for ControlRegion
impl Unpin for ControlRegion
impl UnsafeUnpin for ControlRegion
impl UnwindSafe for ControlRegion
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