pub struct Try {
pub try_token: Token,
pub try_block: Block,
pub error_ident: Token,
pub catch_block: Block,
}Expand description
Represents a try statement in the AST.
The try statement is used for error handling, allowing execution of a block of code
and catching any errors that occur.
Fields§
§try_token: TokenThe token corresponding to the try keyword in the source code.
try_block: BlockThe block of code to execute within the try statement.
error_ident: TokenThe identifier token for the caught error.
catch_block: BlockThe block of code to execute if an error is caught.
Trait Implementations§
impl StructuralPartialEq for Try
Auto Trait Implementations§
impl Freeze for Try
impl RefUnwindSafe for Try
impl Send for Try
impl Sync for Try
impl Unpin for Try
impl UnwindSafe for Try
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