pub struct IfStatement {
pub keyword: _IfKeyword,
pub condition: Box<Expr>,
pub then_clause: Box<ThenClause>,
pub else_clause: Option<Box<ElseClause>>,
}Fields§
§keyword: _IfKeyword§condition: Box<Expr>§then_clause: Box<ThenClause>§else_clause: Option<Box<ElseClause>>Implementations§
Source§impl IfStatement
impl IfStatement
pub fn new( keyword: _IfKeyword, condition: Expr, then_clause: ThenClause, else_clause: Option<ElseClause>, ) -> Self
Trait Implementations§
Source§impl Debug for IfStatement
impl Debug for IfStatement
Source§impl From<IfStatement> for Component
impl From<IfStatement> for Component
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Source§impl From<IfStatement> for Expr
impl From<IfStatement> for Expr
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Source§impl From<IfStatement> for SequenceElement
impl From<IfStatement> for SequenceElement
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Source§impl From<IfStatement> for SyntaxNode
impl From<IfStatement> for SyntaxNode
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Source§impl PrettyTree for IfStatement
impl PrettyTree for IfStatement
Source§fn pretty_tree(&self) -> PrettyNode
fn pretty_tree(&self) -> PrettyNode
Builds the presentation node for this syntax value.
Source§impl<N> Reconstruct<N> for IfStatementwhere
N: ExternalCstNode,
impl<N> Reconstruct<N> for IfStatementwhere
N: ExternalCstNode,
fn matches(node: &N) -> bool
fn reconstruct(node: N) -> Result<Self, ReconstructError>
Source§impl ToCells for IfStatement
impl ToCells for IfStatement
Source§fn to_cells(&self, output: &mut CellStream)
fn to_cells(&self, output: &mut CellStream)
Appends this value’s global cells to
output.Source§fn to_cell_stream(&self, source_id: SourceId) -> CellStream
fn to_cell_stream(&self, source_id: SourceId) -> CellStream
Emits this value into a fresh cell stream with the requested identity.
Source§impl ToTokens for IfStatement
impl ToTokens for IfStatement
Auto Trait Implementations§
impl Freeze for IfStatement
impl RefUnwindSafe for IfStatement
impl Send for IfStatement
impl Sync for IfStatement
impl Unpin for IfStatement
impl UnsafeUnpin for IfStatement
impl UnwindSafe for IfStatement
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