Struct spirt::ControlRegionDef
source · pub struct ControlRegionDef {
pub inputs: SmallVec<[ControlRegionInputDecl; 2]>,
pub children: EntityList<ControlNode>,
pub outputs: SmallVec<[Value; 2]>,
}
Expand description
Definition for a ControlRegion
: a control-flow region.
Fields§
§inputs: SmallVec<[ControlRegionInputDecl; 2]>
Inputs to this ControlRegion
:
- accessed using
Value::ControlRegionInput
- values provided by the parent:
- when this is the function body: the function’s parameters
children: EntityList<ControlNode>
§outputs: SmallVec<[Value; 2]>
Output values from this ControlRegion
, provided to the parent:
- when this is the function body: these are the structured return values
- when this is a
Select
case: these are the values for the parentControlNode
’s outputs (accessed usingValue::ControlNodeOutput
) - when this is a
Loop
body: these are the values to be used for the next loop iteration’s bodyinputs
- not accessible through
Value::ControlNodeOutput
on theLoop
, as it’s both confusing regardingValue::ControlRegionInput
, and also there’s nothing stopping body-defined values from directly being used outside the loop (once that changes, this aspect can be flipped)
- not accessible through
Trait Implementations§
source§impl Clone for ControlRegionDef
impl Clone for ControlRegionDef
source§fn clone(&self) -> ControlRegionDef
fn clone(&self) -> ControlRegionDef
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 moreAuto Trait Implementations§
impl RefUnwindSafe for ControlRegionDef
impl Send for ControlRegionDef
impl Sync for ControlRegionDef
impl Unpin for ControlRegionDef
impl UnwindSafe for ControlRegionDef
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