#[non_exhaustive]pub enum LoopCondition {
BodyTerminal,
WhenSignaled(NodeId),
Exhaust,
}Expand description
What ends a loop.
The compiler resolves this to a concrete form before the executor sees it, so at runtime there is never a question of which node decides.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BodyTerminal
Resolve at compile time to the body’s single terminal node — the one no other body node depends on. Compilation fails if the body has more than one, rather than picking whichever finished last.
This is the default for Node::loop_node.
WhenSignaled(NodeId)
Stop when the named node’s output signals completion.
Exhaust
Ignore signals; run the body exactly max_iterations times.
Trait Implementations§
Source§impl Clone for LoopCondition
impl Clone for LoopCondition
Source§fn clone(&self) -> LoopCondition
fn clone(&self) -> LoopCondition
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 Debug for LoopCondition
impl Debug for LoopCondition
Source§impl Default for LoopCondition
impl Default for LoopCondition
Source§fn default() -> LoopCondition
fn default() -> LoopCondition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LoopCondition
impl<'de> Deserialize<'de> for LoopCondition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LoopCondition
Source§impl PartialEq for LoopCondition
impl PartialEq for LoopCondition
Source§impl Serialize for LoopCondition
impl Serialize for LoopCondition
impl StructuralPartialEq for LoopCondition
Auto Trait Implementations§
impl Freeze for LoopCondition
impl RefUnwindSafe for LoopCondition
impl Send for LoopCondition
impl Sync for LoopCondition
impl Unpin for LoopCondition
impl UnsafeUnpin for LoopCondition
impl UnwindSafe for LoopCondition
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