pub struct StmtTry<R = TextRange> {
pub range: R,
pub body: Vec<Stmt<R>>,
pub handlers: Vec<ExceptHandler<R>>,
pub orelse: Vec<Stmt<R>>,
pub finalbody: Vec<Stmt<R>>,
}
Expand description
See also Try
Fields§
§range: R
§body: Vec<Stmt<R>>
§handlers: Vec<ExceptHandler<R>>
§orelse: Vec<Stmt<R>>
§finalbody: Vec<Stmt<R>>
Trait Implementations§
Source§impl Located for StmtTry<SourceRange>
impl Located for StmtTry<SourceRange>
fn range(&self) -> SourceRange
fn location(&self) -> SourceLocation
fn end_location(&self) -> Option<SourceLocation>
Source§impl LocatedMut for StmtTry<SourceRange>
impl LocatedMut for StmtTry<SourceRange>
fn range_mut(&mut self) -> &mut SourceRange
Source§impl Parse for StmtTry
impl Parse for StmtTry
fn lex_starts_at( source: &str, offset: TextSize, ) -> SoftKeywordTransformer<Lexer<Chars<'_>>>
fn parse_tokens( lxr: impl IntoIterator<Item = Result<(Tok, TextRange), LexicalError>>, source_path: &str, ) -> Result<StmtTry, BaseError<ParseErrorType>>
fn parse( source: &str, source_path: &str, ) -> Result<Self, BaseError<ParseErrorType>>
fn parse_without_path(source: &str) -> Result<Self, BaseError<ParseErrorType>>
fn parse_starts_at( source: &str, source_path: &str, offset: TextSize, ) -> Result<Self, BaseError<ParseErrorType>>
impl<R> StructuralPartialEq for StmtTry<R>
Auto Trait Implementations§
impl<R> Freeze for StmtTry<R>where
R: Freeze,
impl<R> RefUnwindSafe for StmtTry<R>where
R: RefUnwindSafe,
impl<R> Send for StmtTry<R>where
R: Send,
impl<R> Sync for StmtTry<R>where
R: Sync,
impl<R> Unpin for StmtTry<R>where
R: Unpin,
impl<R> UnwindSafe for StmtTry<R>where
R: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more