pub struct CaseArm {
pub tag: Option<usize>,
pub tag_span: Span,
pub arm: Arm,
}Expand description
A single arm of a case!, i.e. 1(x, Some(y)) => x + y,. This implements Parse.
Fields§
§tag: Option<usize>The tag for this case, or None if the case was a catch-all _ case.
tag_span: SpanThe span for the tag.
arm: ArmThe Arm for the case, i.e. the pattern following the tag, its =>, and its body.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaseArm
impl RefUnwindSafe for CaseArm
impl !Send for CaseArm
impl !Sync for CaseArm
impl Unpin for CaseArm
impl UnwindSafe for CaseArm
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