pub struct WhileOperation<'c> { /* private fields */ }
Expand description
A while_loop
operation. Output = input; While (Cond(output)) {output = Body(output)}.
Generates and evaluates a Bool condition and either executes a loop body or exits to another control point. This action is performed repeatedly after updating and re-evaluating the Boolean condition every iteration. This implements the semantic foreach or while iterative loop structure.
Implementations§
source§impl<'c> WhileOperation<'c>
impl<'c> WhileOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> WhileOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> WhileOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn output(&self) -> impl Iterator<Item = OperationResult<'c, '_>>
pub fn inputs(&self) -> impl Iterator<Item = Value<'c, '_>>
pub fn cond(&self) -> Result<RegionRef<'c, '_>, Error>
pub fn body(&self) -> Result<RegionRef<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<WhileOperation<'c>> for Operation<'c>
impl<'c> From<WhileOperation<'c>> for Operation<'c>
source§fn from(operation: WhileOperation<'c>) -> Self
fn from(operation: WhileOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for WhileOperation<'c>
impl<'c> !Send for WhileOperation<'c>
impl<'c> !Sync for WhileOperation<'c>
impl<'c> Unpin for WhileOperation<'c>
impl<'c> UnwindSafe for WhileOperation<'c>
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