pub struct CaseArm<W, C> {
pub patterns: CasePatternFragments<W>,
pub body: CommandGroup<C>,
pub arm_comment: Option<Newline>,
}
Expand description
An individual “unit of execution” within a case
command.
Each arm has a number of pattern alternatives, and a body of commands to run if any pattern matches.
Fields§
§patterns: CasePatternFragments<W>
The patterns which correspond to this case arm.
body: CommandGroup<C>
The body of commands to run if any pattern matches.
arm_comment: Option<Newline>
A comment appearing at the end of the arm declaration,
i.e. after ;;
but on the same line.
Trait Implementations§
impl<W: Eq, C: Eq> Eq for CaseArm<W, C>
impl<W, C> StructuralPartialEq for CaseArm<W, C>
Auto Trait Implementations§
impl<W, C> Freeze for CaseArm<W, C>
impl<W, C> RefUnwindSafe for CaseArm<W, C>where
W: RefUnwindSafe,
C: RefUnwindSafe,
impl<W, C> Send for CaseArm<W, C>
impl<W, C> Sync for CaseArm<W, C>
impl<W, C> Unpin for CaseArm<W, C>
impl<W, C> UnwindSafe for CaseArm<W, C>where
W: UnwindSafe,
C: UnwindSafe,
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