Crate fallthrough

Source
Expand description

This crate provides a fallthrough macro, which allows performing a pattern match with fallthrough through the arms, in the style of C switch.

Macros§

fallthrough
Accepts a match scrutinee, followed by a comma-separated list of zero or more pattern match arms. All arms but the first must be preceded with a 'label: . Only the first arm can access identifiers bound by the pattern match. Inside the match arms, calling break 'label; will jump to the label’s corresponding match arm (you can only jump downwards). The list of arms can optionally be followed by a final trailing label, which can be used to jump out of the fallthrough entirely.