1 stable release
1.0.0 | Jan 2, 2025 |
---|
#1560 in Rust patterns
8KB
controlflow_inspect
inspect_break
and inspect_continue
for ControlFlow
.
Overview
Analogically to inspect
and inspect_err
for inspecting values inside Result
, this crate
introduces inspect_break
and inspect_continue
for ControlFlow
. Neither the break nor the
continue variant of ControlFlow
is more important than the other, so the methods are named
symmetrically.
lib.rs
:
An extension trait for ControlFlow
which provides inspection methods
The naming conventions are derived from Result::inspect_err
. Since ControlFlow
is more
symmetrical than Result
, the methods are called inspect_break
and inspect_continue
.