pub struct CaseStatement {
pub case_token: AttachedToken,
pub match_expr: Option<Expr>,
pub when_blocks: Vec<ConditionalStatementBlock>,
pub else_block: Option<ConditionalStatementBlock>,
pub end_case_token: AttachedToken,
}Expand description
Fields§
§case_token: AttachedTokenThe CASE token that starts the statement.
match_expr: Option<Expr>Optional expression to match against in CASE ... WHEN.
when_blocks: Vec<ConditionalStatementBlock>The WHEN ... THEN blocks of the CASE statement.
else_block: Option<ConditionalStatementBlock>Optional ELSE block for the CASE statement.
end_case_token: AttachedTokenThe last token of the statement (END or CASE).
Trait Implementations§
Source§impl Clone for CaseStatement
impl Clone for CaseStatement
Source§fn clone(&self) -> CaseStatement
fn clone(&self) -> CaseStatement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CaseStatement
impl Debug for CaseStatement
Source§impl Display for CaseStatement
impl Display for CaseStatement
Source§impl From<CaseStatement> for Statement
impl From<CaseStatement> for Statement
Source§fn from(c: CaseStatement) -> Self
fn from(c: CaseStatement) -> Self
Converts to this type from the input type.
Source§impl Hash for CaseStatement
impl Hash for CaseStatement
Source§impl Ord for CaseStatement
impl Ord for CaseStatement
Source§fn cmp(&self, other: &CaseStatement) -> Ordering
fn cmp(&self, other: &CaseStatement) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CaseStatement
impl PartialEq for CaseStatement
Source§impl PartialOrd for CaseStatement
impl PartialOrd for CaseStatement
Source§impl Spanned for CaseStatement
impl Spanned for CaseStatement
Source§impl Visit for CaseStatement
impl Visit for CaseStatement
Source§impl VisitMut for CaseStatement
impl VisitMut for CaseStatement
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
Mutably visit this node with the provided
VisitorMut. Read moreimpl Eq for CaseStatement
impl StructuralPartialEq for CaseStatement
Auto Trait Implementations§
impl Freeze for CaseStatement
impl RefUnwindSafe for CaseStatement
impl Send for CaseStatement
impl Sync for CaseStatement
impl Unpin for CaseStatement
impl UnsafeUnpin for CaseStatement
impl UnwindSafe for CaseStatement
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