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 moreSource§impl Default for ControlRegionDef
impl Default for ControlRegionDef
Source§fn default() -> ControlRegionDef
fn default() -> ControlRegionDef
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ControlRegionDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more