pub struct MatchCase {
pub pattern: Pattern,
pub guard: Option<Expression>,
pub body: Vec<Statement>,
}Expand description
Represents a case in a match statement.
Fields§
§pattern: PatternPattern to match
guard: Option<Expression>Optional guard expression
body: Vec<Statement>Case body
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MatchCase
impl<'de> Deserialize<'de> for MatchCase
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 StructuralPartialEq for MatchCase
Auto Trait Implementations§
impl Freeze for MatchCase
impl RefUnwindSafe for MatchCase
impl Send for MatchCase
impl Sync for MatchCase
impl Unpin for MatchCase
impl UnwindSafe for MatchCase
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