pub enum RegionNode {
RepeatUntilSuccess {
body: SubGraph,
restart_condition: ClassicalExpr,
restart_source: Option<ValueRef>,
},
}Expand description
A structured control-flow region.
Its interface is the body’s declared bit result and boundary bindings. Its predicate arrives on a
Value edge; its body is a SubGraph over the same global template pool.
Variants§
RepeatUntilSuccess
Region carrying a postselection/restart predicate. Execution retries a sandboxed body until its restart predicate is false, subject to a configured execution cap. Decoder results affect retries only through the explicit predicate; physical restart parities can abort an attempt early.
restart_condition reads incoming Value slots; unfed slots read the
optional body-local restart_source. Constant predicates need no source.
The body’s declared result remains independent of the restart predicate.
Implementations§
Source§impl RegionNode
impl RegionNode
Sourcepub fn bodies(&self) -> impl Iterator<Item = (BodySelector, &SubGraph)>
pub fn bodies(&self) -> impl Iterator<Item = (BodySelector, &SubGraph)>
The region’s body subgraph.
Sourcepub fn bodies_mut(
&mut self,
) -> impl Iterator<Item = (BodySelector, &mut SubGraph)>
pub fn bodies_mut( &mut self, ) -> impl Iterator<Item = (BodySelector, &mut SubGraph)>
The mutable mirror of Self::bodies.
Source§impl RegionNode
impl RegionNode
Sourcepub fn kind(&self) -> RegionKind
pub fn kind(&self) -> RegionKind
This region’s variant, without its payload.
Trait Implementations§
Source§impl Clone for RegionNode
impl Clone for RegionNode
Source§fn clone(&self) -> RegionNode
fn clone(&self) -> RegionNode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more