Enum chalk_ir::visit::ControlFlow[][src]

pub enum ControlFlow<B, C = ()> {
    Continue(C),
    Break(B),
}
Expand description

An copy of the unstable std::ops::ControlFlow for use in Chalk visitors.

Variants

Continue(C)

Continue in the loop, using the given value for the next iteration

Tuple Fields of Continue

0: C
Break(B)

Exit the loop, yielding the given value

Tuple Fields of Break

0: B

Implementations

Returns true if this is a Break variant.

Returns true if this is a Continue variant.

Converts the ControlFlow into an Option which is Some if the ControlFlow was Break and None otherwise.

It’s frequently the case that there’s no value needed with Continue, so this provides a way to avoid typing (()), if you prefer it.

APIs like try_for_each don’t need values with Break, so this provides a way to avoid typing (()), if you prefer it.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast a value to type U using CastTo.

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.