Used to tell an operation whether it should exit early or go on as usual.
This acts as the basis of the TRY
protocol in Rune.
Examples
use ControlFlow;
let c = Continue;
assert_eq!;
assert_eq!;
Trait Implementations
impl PartialEq
for ControlFlow
Compare two values for equality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
Compare two values for inequality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
impl Eq
for ControlFlow
impl Clone
for ControlFlow
Clone the specified value
.
Examples
let a = 42;
let b = a;
let c = a.clone;
a += 1;
assert_eq!;
assert_eq!;
assert_eq!;
Protocols
protocol IS_VARIANT
Test if the provided argument is a variant.
protocol PARTIAL_EQ
if value == b
Test two control flows for partial equality.
Examples
use ;
assert_eq! ;
assert_eq! ;
assert_eq! ;
protocol EQ
if value == b
Test two control flows for total equality.
Examples
use ;
assert_eq! ;
assert_eq! ;
assert_eq! ;
protocol DEBUG_FMT
format!
Debug print the control flow.
Examples
use ControlFlow;
let string = format!;
protocol CLONE
let $out = clone
Clone the control flow.
Examples
use ControlFlow;
let flow = Continue;
let flow2 = flow.clone;
assert_eq!;