pub struct ExprIfExp<R = TextRange> {
pub range: R,
pub test: Box<Expr<R>>,
pub body: Box<Expr<R>>,
pub orelse: Box<Expr<R>>,
}
Expand description
See also IfExp
Fields§
§range: R
§test: Box<Expr<R>>
§body: Box<Expr<R>>
§orelse: Box<Expr<R>>
Trait Implementations§
Source§impl Located for ExprIfExp<SourceRange>
impl Located for ExprIfExp<SourceRange>
fn range(&self) -> SourceRange
fn location(&self) -> SourceLocation
fn end_location(&self) -> Option<SourceLocation>
Source§impl LocatedMut for ExprIfExp<SourceRange>
impl LocatedMut for ExprIfExp<SourceRange>
fn range_mut(&mut self) -> &mut SourceRange
Source§impl Parse for ExprIfExp
impl Parse for ExprIfExp
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<ExprIfExp, 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 ExprIfExp<R>
Auto Trait Implementations§
impl<R> Freeze for ExprIfExp<R>where
R: Freeze,
impl<R> RefUnwindSafe for ExprIfExp<R>where
R: RefUnwindSafe,
impl<R> Send for ExprIfExp<R>where
R: Send,
impl<R> Sync for ExprIfExp<R>where
R: Sync,
impl<R> Unpin for ExprIfExp<R>where
R: Unpin,
impl<R> UnwindSafe for ExprIfExp<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