pub struct MatchCase { /* private fields */ }Expand description
A match statement case.
Trait Implementations§
Source§impl<E: 'static + Expression> From<E> for MatchCase
impl<E: 'static + Expression> From<E> for MatchCase
Source§impl Statement for MatchCase
impl Statement for MatchCase
Source§fn write(&self, b: &mut CodeBuffer, level: usize)
fn write(&self, b: &mut CodeBuffer, level: usize)
Writes the code to the buffer
b at the indent level.Source§impl WithStatements for MatchCase
impl WithStatements for MatchCase
Source§fn statements(&self) -> &[Box<dyn Statement>]
fn statements(&self) -> &[Box<dyn Statement>]
Gets the statements.
Source§fn add_boxed_statement(&mut self, statement: Box<dyn Statement>)
fn add_boxed_statement(&mut self, statement: Box<dyn Statement>)
Adds the boxed
statement.Source§fn with_boxed_statement(self, statement: Box<dyn Statement>) -> Self
fn with_boxed_statement(self, statement: Box<dyn Statement>) -> Self
Adds the boxed
statement.Source§fn add_statement<S>(&mut self, statement: S)where
S: 'static + Statement,
fn add_statement<S>(&mut self, statement: S)where
S: 'static + Statement,
Adds the
statement.Source§fn with_statement<S>(self, statement: S) -> Selfwhere
S: 'static + Statement,
fn with_statement<S>(self, statement: S) -> Selfwhere
S: 'static + Statement,
Adds the
statement.Source§fn add_literal<L>(&mut self, literal: L)
fn add_literal<L>(&mut self, literal: L)
Adds the
literal statement.Source§fn with_literal<L>(self, literal: L) -> Self
fn with_literal<L>(self, literal: L) -> Self
Adds the
literal statement.Source§fn add_expression_statement<E>(&mut self, expression: E)where
E: 'static + Expression,
fn add_expression_statement<E>(&mut self, expression: E)where
E: 'static + Expression,
Adds the
expression as a statement.Source§fn with_expression_statement<E>(self, expression: E) -> Selfwhere
E: 'static + Expression,
fn with_expression_statement<E>(self, expression: E) -> Selfwhere
E: 'static + Expression,
Adds the
expression as a statement.Source§fn write_statements(&self, b: &mut CodeBuffer, level: usize)
fn write_statements(&self, b: &mut CodeBuffer, level: usize)
Writes the statements.
Source§fn write_curly_statement_block(&self, b: &mut CodeBuffer, level: usize)
fn write_curly_statement_block(&self, b: &mut CodeBuffer, level: usize)
Writes the curly-bracketed statement block. (
level is the outer level)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