pub enum CaseContinuation {
Break,
FallThrough,
Continue,
}
Expand description
Symbol that terminates the body of a case branch and determines what to do after executing it
Variants§
Break
;;
(terminate the case construct)
FallThrough
;&
(unconditionally execute the body of the next case branch)
Continue
;|
or ;;&
(resume with the next case branch, performing pattern matching again)
Trait Implementations§
Source§impl Clone for CaseContinuation
impl Clone for CaseContinuation
Source§fn clone(&self) -> CaseContinuation
fn clone(&self) -> CaseContinuation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CaseContinuation
impl Debug for CaseContinuation
Source§impl Default for CaseContinuation
impl Default for CaseContinuation
Source§fn default() -> CaseContinuation
fn default() -> CaseContinuation
Returns the “default value” for a type. Read more
Source§impl Display for CaseContinuation
impl Display for CaseContinuation
Source§impl From<CaseContinuation> for Operator
impl From<CaseContinuation> for Operator
Source§fn from(cc: CaseContinuation) -> Operator
fn from(cc: CaseContinuation) -> Operator
Converts a case continuation into an operator.
The Continue
variant is converted into SemicolonBar
.
Source§impl PartialEq for CaseContinuation
impl PartialEq for CaseContinuation
Source§impl TryFrom<Operator> for CaseContinuation
impl TryFrom<Operator> for CaseContinuation
Source§fn try_from(op: Operator) -> Result<CaseContinuation, TryFromOperatorError>
fn try_from(op: Operator) -> Result<CaseContinuation, TryFromOperatorError>
Converts an operator into a case continuation.
The SemicolonBar
and SemicolonSemicolonAnd
operators are converted
into Continue
; you cannot distinguish between the two from the return
value.
Source§type Error = TryFromOperatorError
type Error = TryFromOperatorError
The type returned in the event of a conversion error.
impl Copy for CaseContinuation
impl Eq for CaseContinuation
impl StructuralPartialEq for CaseContinuation
Auto Trait Implementations§
impl Freeze for CaseContinuation
impl RefUnwindSafe for CaseContinuation
impl Send for CaseContinuation
impl Sync for CaseContinuation
impl Unpin for CaseContinuation
impl UnwindSafe for CaseContinuation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more