pub struct TryStatement {
pub try_token: _Try,
pub value: Box<Expr>,
pub on_success: Option<ThenClause>,
pub fallback: Option<TryFallback>,
}Expand description
A typed Macaulay2 try_statement syntax node.
Fields§
§try_token: _TryThe try_token child of this syntax node.
value: Box<Expr>The value child of this syntax node.
on_success: Option<ThenClause>The on_success child of this syntax node.
fallback: Option<TryFallback>The fallback child of this syntax node.
Implementations§
Source§impl TryStatement
impl TryStatement
Sourcepub fn new(
try_token: _Try,
value: Expr,
on_success: Option<ThenClause>,
fallback: Option<TryFallback>,
) -> Self
pub fn new( try_token: _Try, value: Expr, on_success: Option<ThenClause>, fallback: Option<TryFallback>, ) -> Self
Creates this node from its typed children.
Trait Implementations§
Source§impl Debug for TryStatement
impl Debug for TryStatement
Source§impl From<TryStatement> for Component
impl From<TryStatement> for Component
Source§fn from(value: TryStatement) -> Self
fn from(value: TryStatement) -> Self
Converts to this type from the input type.
Source§impl From<TryStatement> for Expr
impl From<TryStatement> for Expr
Source§fn from(value: TryStatement) -> Self
fn from(value: TryStatement) -> Self
Converts to this type from the input type.
Source§impl Lex for TryStatement
impl Lex for TryStatement
Source§fn to_tokens(&self, output: &mut TokenStream)
fn to_tokens(&self, output: &mut TokenStream)
Appends this value’s token trees to
output.Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Emits this value into a fresh token stream.
Source§impl PrettyTree for TryStatement
impl PrettyTree for TryStatement
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 TryStatementwhere
N: ExternalCstNode,
impl<N> Reconstruct<N> for TryStatementwhere
N: ExternalCstNode,
Auto Trait Implementations§
impl Freeze for TryStatement
impl RefUnwindSafe for TryStatement
impl Send for TryStatement
impl Sync for TryStatement
impl Unpin for TryStatement
impl UnsafeUnpin for TryStatement
impl UnwindSafe for TryStatement
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