pub enum TryStmt {
Basic {
leading_comments: Vec<Comment>,
try_span: Span,
block: Block,
catches: Vec<CatchClause>,
finally_block: Option<(Span, Block)>,
},
TryWithResources {
leading_comments: Vec<Comment>,
try_span: Span,
paren_span: (Span, Span),
resources: Vec<TryResource>,
block: Block,
catches: Vec<CatchClause>,
finally_block: Option<(Span, Block)>,
},
}Expand description
A try statement.
Variants§
Basic
try { ... } catches [finally]
Fields
§
catches: Vec<CatchClause>TryWithResources
try (resources) { ... } catches [finally]
Implementations§
Trait Implementations§
impl Eq for TryStmt
impl StructuralPartialEq for TryStmt
Auto Trait Implementations§
impl Freeze for TryStmt
impl RefUnwindSafe for TryStmt
impl Send for TryStmt
impl Sync for TryStmt
impl Unpin for TryStmt
impl UnsafeUnpin for TryStmt
impl UnwindSafe for TryStmt
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