pub struct MatchArm {
pub pattern: Pattern,
pub guard: Option<Expr>,
pub body: Expr,
pub span: Range<usize>,
}Expand description
Represents a match arm in a match expression.
Fields§
§pattern: PatternThe pattern to match
guard: Option<Expr>Optional guard expression
body: ExprThe arm body expression
span: Range<usize>Source code span where this match arm appears
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MatchArm
impl<'de> Deserialize<'de> for MatchArm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MatchArm
impl StructuralPartialEq for MatchArm
Auto Trait Implementations§
impl Freeze for MatchArm
impl RefUnwindSafe for MatchArm
impl Send for MatchArm
impl Sync for MatchArm
impl Unpin for MatchArm
impl UnwindSafe for MatchArm
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