pub struct ExprMatch {
pub subject: Box<Expr>,
pub arms: Vec<MatchArm>,
pub else_expr: Box<Expr>,
}Expand description
A match expression that dispatches on a subject expression.
Each arm matches the subject against a constant value pattern and evaluates
the corresponding expression. Expr::Match is never serialized to SQL — it
is either evaluated in the engine (for writes) or eliminated by the
simplifier before the plan stage (for reads/queries).
Fields§
§subject: Box<Expr>The expression to dispatch on.
arms: Vec<MatchArm>The match arms, in order.
else_expr: Box<Expr>Fallback expression evaluated when no arm matches.
Trait Implementations§
impl StructuralPartialEq for ExprMatch
Auto Trait Implementations§
impl Freeze for ExprMatch
impl RefUnwindSafe for ExprMatch
impl Send for ExprMatch
impl Sync for ExprMatch
impl Unpin for ExprMatch
impl UnwindSafe for ExprMatch
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