pub struct Switch { /* private fields */ }
Expand description
The switch
statement evaluates an expression, matching the expression’s value to a case
clause, and executes statements associated with that case, as well as statements in cases
that follow the matching case.
A switch
statement first evaluates its expression. It then looks for the first case
clause whose expression evaluates to the same value as the result of the input expression
(using the strict comparison, ===
) and transfers control to that clause, executing the
associated statements. (If multiple cases match the provided value, the first case that
matches is selected, even if the cases are not equal to each other.)
More information:
Implementations
Trait Implementations
sourceimpl Executable for Switch
impl Executable for Switch
sourceimpl Trace for Switch
impl Trace for Switch
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for Switch
Auto Trait Implementations
impl RefUnwindSafe for Switch
impl !Send for Switch
impl !Sync for Switch
impl Unpin for Switch
impl UnwindSafe for Switch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more