Enum rustpython_ast::Ast
source · pub enum Ast<R = TextRange> {
Show 19 variants
Mod(Mod<R>),
Stmt(Stmt<R>),
Expr(Expr<R>),
ExprContext(ExprContext),
BoolOp(BoolOp),
Operator(Operator),
UnaryOp(UnaryOp),
CmpOp(CmpOp),
Comprehension(Comprehension<R>),
ExceptHandler(ExceptHandler<R>),
Arguments(Arguments<R>),
Arg(Arg<R>),
Keyword(Keyword<R>),
Alias(Alias<R>),
WithItem(WithItem<R>),
MatchCase(MatchCase<R>),
Pattern(Pattern<R>),
TypeIgnore(TypeIgnore<R>),
TypeParam(TypeParam<R>),
}
Variants§
Mod(Mod<R>)
Stmt(Stmt<R>)
Expr(Expr<R>)
ExprContext(ExprContext)
BoolOp(BoolOp)
Operator(Operator)
UnaryOp(UnaryOp)
CmpOp(CmpOp)
Comprehension(Comprehension<R>)
ExceptHandler(ExceptHandler<R>)
Arguments(Arguments<R>)
Arg(Arg<R>)
Keyword(Keyword<R>)
Alias(Alias<R>)
WithItem(WithItem<R>)
MatchCase(MatchCase<R>)
Pattern(Pattern<R>)
TypeIgnore(TypeIgnore<R>)
TypeParam(TypeParam<R>)
Implementations§
source§impl<R> Ast<R>
impl<R> Ast<R>
sourcepub fn as_module(&self) -> Option<&Mod<R>>
pub fn as_module(&self) -> Option<&Mod<R>>
Returns Some
if self
is a reference of variant Mod
, and None
otherwise.
sourcepub fn as_mut_module(&mut self) -> Option<&mut Mod<R>>
pub fn as_mut_module(&mut self) -> Option<&mut Mod<R>>
Returns Some
if self
is a mutable reference of variant Mod
, and None
otherwise.
sourcepub fn expect_module(self) -> Mod<R>where
Self: Debug,
pub fn expect_module(self) -> Mod<R>where
Self: Debug,
sourcepub fn module(self) -> Option<Mod<R>>
pub fn module(self) -> Option<Mod<R>>
Returns Some
if self
is of variant Mod
, and None
otherwise.
sourcepub fn as_stmt(&self) -> Option<&Stmt<R>>
pub fn as_stmt(&self) -> Option<&Stmt<R>>
Returns Some
if self
is a reference of variant Stmt
, and None
otherwise.
sourcepub fn as_mut_stmt(&mut self) -> Option<&mut Stmt<R>>
pub fn as_mut_stmt(&mut self) -> Option<&mut Stmt<R>>
Returns Some
if self
is a mutable reference of variant Stmt
, and None
otherwise.
sourcepub fn expect_stmt(self) -> Stmt<R>where
Self: Debug,
pub fn expect_stmt(self) -> Stmt<R>where
Self: Debug,
sourcepub fn stmt(self) -> Option<Stmt<R>>
pub fn stmt(self) -> Option<Stmt<R>>
Returns Some
if self
is of variant Stmt
, and None
otherwise.
sourcepub fn as_expr(&self) -> Option<&Expr<R>>
pub fn as_expr(&self) -> Option<&Expr<R>>
Returns Some
if self
is a reference of variant Expr
, and None
otherwise.
sourcepub fn as_mut_expr(&mut self) -> Option<&mut Expr<R>>
pub fn as_mut_expr(&mut self) -> Option<&mut Expr<R>>
Returns Some
if self
is a mutable reference of variant Expr
, and None
otherwise.
sourcepub fn expect_expr(self) -> Expr<R>where
Self: Debug,
pub fn expect_expr(self) -> Expr<R>where
Self: Debug,
sourcepub fn expr(self) -> Option<Expr<R>>
pub fn expr(self) -> Option<Expr<R>>
Returns Some
if self
is of variant Expr
, and None
otherwise.
sourcepub const fn is_expr_context(&self) -> bool
pub const fn is_expr_context(&self) -> bool
Returns true
if self
is of variant ExprContext
.
sourcepub fn as_expr_context(&self) -> Option<&ExprContext>
pub fn as_expr_context(&self) -> Option<&ExprContext>
Returns Some
if self
is a reference of variant ExprContext
, and None
otherwise.
sourcepub fn as_mut_expr_context(&mut self) -> Option<&mut ExprContext>
pub fn as_mut_expr_context(&mut self) -> Option<&mut ExprContext>
Returns Some
if self
is a mutable reference of variant ExprContext
, and None
otherwise.
sourcepub fn expect_expr_context(self) -> ExprContextwhere
Self: Debug,
pub fn expect_expr_context(self) -> ExprContextwhere
Self: Debug,
Unwraps the value, yielding the content of ExprContext
.
§Panics
Panics if the value is not ExprContext
, with a panic message including the content of self
.
sourcepub fn expr_context(self) -> Option<ExprContext>
pub fn expr_context(self) -> Option<ExprContext>
Returns Some
if self
is of variant ExprContext
, and None
otherwise.
sourcepub const fn is_bool_op(&self) -> bool
pub const fn is_bool_op(&self) -> bool
Returns true
if self
is of variant BoolOp
.
sourcepub fn as_bool_op(&self) -> Option<&BoolOp>
pub fn as_bool_op(&self) -> Option<&BoolOp>
Returns Some
if self
is a reference of variant BoolOp
, and None
otherwise.
sourcepub fn as_mut_bool_op(&mut self) -> Option<&mut BoolOp>
pub fn as_mut_bool_op(&mut self) -> Option<&mut BoolOp>
Returns Some
if self
is a mutable reference of variant BoolOp
, and None
otherwise.
sourcepub fn expect_bool_op(self) -> BoolOpwhere
Self: Debug,
pub fn expect_bool_op(self) -> BoolOpwhere
Self: Debug,
sourcepub fn bool_op(self) -> Option<BoolOp>
pub fn bool_op(self) -> Option<BoolOp>
Returns Some
if self
is of variant BoolOp
, and None
otherwise.
sourcepub const fn is_operator(&self) -> bool
pub const fn is_operator(&self) -> bool
Returns true
if self
is of variant Operator
.
sourcepub fn as_operator(&self) -> Option<&Operator>
pub fn as_operator(&self) -> Option<&Operator>
Returns Some
if self
is a reference of variant Operator
, and None
otherwise.
sourcepub fn as_mut_operator(&mut self) -> Option<&mut Operator>
pub fn as_mut_operator(&mut self) -> Option<&mut Operator>
Returns Some
if self
is a mutable reference of variant Operator
, and None
otherwise.
sourcepub fn expect_operator(self) -> Operatorwhere
Self: Debug,
pub fn expect_operator(self) -> Operatorwhere
Self: Debug,
sourcepub fn operator(self) -> Option<Operator>
pub fn operator(self) -> Option<Operator>
Returns Some
if self
is of variant Operator
, and None
otherwise.
sourcepub const fn is_unary_op(&self) -> bool
pub const fn is_unary_op(&self) -> bool
Returns true
if self
is of variant UnaryOp
.
sourcepub fn as_unary_op(&self) -> Option<&UnaryOp>
pub fn as_unary_op(&self) -> Option<&UnaryOp>
Returns Some
if self
is a reference of variant UnaryOp
, and None
otherwise.
sourcepub fn as_mut_unary_op(&mut self) -> Option<&mut UnaryOp>
pub fn as_mut_unary_op(&mut self) -> Option<&mut UnaryOp>
Returns Some
if self
is a mutable reference of variant UnaryOp
, and None
otherwise.
sourcepub fn expect_unary_op(self) -> UnaryOpwhere
Self: Debug,
pub fn expect_unary_op(self) -> UnaryOpwhere
Self: Debug,
sourcepub fn unary_op(self) -> Option<UnaryOp>
pub fn unary_op(self) -> Option<UnaryOp>
Returns Some
if self
is of variant UnaryOp
, and None
otherwise.
sourcepub fn as_cmp_op(&self) -> Option<&CmpOp>
pub fn as_cmp_op(&self) -> Option<&CmpOp>
Returns Some
if self
is a reference of variant CmpOp
, and None
otherwise.
sourcepub fn as_mut_cmp_op(&mut self) -> Option<&mut CmpOp>
pub fn as_mut_cmp_op(&mut self) -> Option<&mut CmpOp>
Returns Some
if self
is a mutable reference of variant CmpOp
, and None
otherwise.
sourcepub fn expect_cmp_op(self) -> CmpOpwhere
Self: Debug,
pub fn expect_cmp_op(self) -> CmpOpwhere
Self: Debug,
sourcepub fn cmp_op(self) -> Option<CmpOp>
pub fn cmp_op(self) -> Option<CmpOp>
Returns Some
if self
is of variant CmpOp
, and None
otherwise.
sourcepub const fn is_comprehension(&self) -> bool
pub const fn is_comprehension(&self) -> bool
Returns true
if self
is of variant Comprehension
.
sourcepub fn as_comprehension(&self) -> Option<&Comprehension<R>>
pub fn as_comprehension(&self) -> Option<&Comprehension<R>>
Returns Some
if self
is a reference of variant Comprehension
, and None
otherwise.
sourcepub fn as_mut_comprehension(&mut self) -> Option<&mut Comprehension<R>>
pub fn as_mut_comprehension(&mut self) -> Option<&mut Comprehension<R>>
Returns Some
if self
is a mutable reference of variant Comprehension
, and None
otherwise.
sourcepub fn expect_comprehension(self) -> Comprehension<R>where
Self: Debug,
pub fn expect_comprehension(self) -> Comprehension<R>where
Self: Debug,
Unwraps the value, yielding the content of Comprehension
.
§Panics
Panics if the value is not Comprehension
, with a panic message including the content of self
.
sourcepub fn comprehension(self) -> Option<Comprehension<R>>
pub fn comprehension(self) -> Option<Comprehension<R>>
Returns Some
if self
is of variant Comprehension
, and None
otherwise.
sourcepub const fn is_except_handler(&self) -> bool
pub const fn is_except_handler(&self) -> bool
Returns true
if self
is of variant ExceptHandler
.
sourcepub fn as_except_handler(&self) -> Option<&ExceptHandler<R>>
pub fn as_except_handler(&self) -> Option<&ExceptHandler<R>>
Returns Some
if self
is a reference of variant ExceptHandler
, and None
otherwise.
sourcepub fn as_mut_except_handler(&mut self) -> Option<&mut ExceptHandler<R>>
pub fn as_mut_except_handler(&mut self) -> Option<&mut ExceptHandler<R>>
Returns Some
if self
is a mutable reference of variant ExceptHandler
, and None
otherwise.
sourcepub fn expect_except_handler(self) -> ExceptHandler<R>where
Self: Debug,
pub fn expect_except_handler(self) -> ExceptHandler<R>where
Self: Debug,
Unwraps the value, yielding the content of ExceptHandler
.
§Panics
Panics if the value is not ExceptHandler
, with a panic message including the content of self
.
sourcepub fn except_handler(self) -> Option<ExceptHandler<R>>
pub fn except_handler(self) -> Option<ExceptHandler<R>>
Returns Some
if self
is of variant ExceptHandler
, and None
otherwise.
sourcepub const fn is_arguments(&self) -> bool
pub const fn is_arguments(&self) -> bool
Returns true
if self
is of variant Arguments
.
sourcepub fn as_arguments(&self) -> Option<&Arguments<R>>
pub fn as_arguments(&self) -> Option<&Arguments<R>>
Returns Some
if self
is a reference of variant Arguments
, and None
otherwise.
sourcepub fn as_mut_arguments(&mut self) -> Option<&mut Arguments<R>>
pub fn as_mut_arguments(&mut self) -> Option<&mut Arguments<R>>
Returns Some
if self
is a mutable reference of variant Arguments
, and None
otherwise.
sourcepub fn expect_arguments(self) -> Arguments<R>where
Self: Debug,
pub fn expect_arguments(self) -> Arguments<R>where
Self: Debug,
sourcepub fn arguments(self) -> Option<Arguments<R>>
pub fn arguments(self) -> Option<Arguments<R>>
Returns Some
if self
is of variant Arguments
, and None
otherwise.
sourcepub fn as_arg(&self) -> Option<&Arg<R>>
pub fn as_arg(&self) -> Option<&Arg<R>>
Returns Some
if self
is a reference of variant Arg
, and None
otherwise.
sourcepub fn as_mut_arg(&mut self) -> Option<&mut Arg<R>>
pub fn as_mut_arg(&mut self) -> Option<&mut Arg<R>>
Returns Some
if self
is a mutable reference of variant Arg
, and None
otherwise.
sourcepub fn expect_arg(self) -> Arg<R>where
Self: Debug,
pub fn expect_arg(self) -> Arg<R>where
Self: Debug,
sourcepub const fn is_keyword(&self) -> bool
pub const fn is_keyword(&self) -> bool
Returns true
if self
is of variant Keyword
.
sourcepub fn as_keyword(&self) -> Option<&Keyword<R>>
pub fn as_keyword(&self) -> Option<&Keyword<R>>
Returns Some
if self
is a reference of variant Keyword
, and None
otherwise.
sourcepub fn as_mut_keyword(&mut self) -> Option<&mut Keyword<R>>
pub fn as_mut_keyword(&mut self) -> Option<&mut Keyword<R>>
Returns Some
if self
is a mutable reference of variant Keyword
, and None
otherwise.
sourcepub fn expect_keyword(self) -> Keyword<R>where
Self: Debug,
pub fn expect_keyword(self) -> Keyword<R>where
Self: Debug,
sourcepub fn keyword(self) -> Option<Keyword<R>>
pub fn keyword(self) -> Option<Keyword<R>>
Returns Some
if self
is of variant Keyword
, and None
otherwise.
sourcepub fn as_alias(&self) -> Option<&Alias<R>>
pub fn as_alias(&self) -> Option<&Alias<R>>
Returns Some
if self
is a reference of variant Alias
, and None
otherwise.
sourcepub fn as_mut_alias(&mut self) -> Option<&mut Alias<R>>
pub fn as_mut_alias(&mut self) -> Option<&mut Alias<R>>
Returns Some
if self
is a mutable reference of variant Alias
, and None
otherwise.
sourcepub fn expect_alias(self) -> Alias<R>where
Self: Debug,
pub fn expect_alias(self) -> Alias<R>where
Self: Debug,
sourcepub fn alias(self) -> Option<Alias<R>>
pub fn alias(self) -> Option<Alias<R>>
Returns Some
if self
is of variant Alias
, and None
otherwise.
sourcepub const fn is_with_item(&self) -> bool
pub const fn is_with_item(&self) -> bool
Returns true
if self
is of variant WithItem
.
sourcepub fn as_with_item(&self) -> Option<&WithItem<R>>
pub fn as_with_item(&self) -> Option<&WithItem<R>>
Returns Some
if self
is a reference of variant WithItem
, and None
otherwise.
sourcepub fn as_mut_with_item(&mut self) -> Option<&mut WithItem<R>>
pub fn as_mut_with_item(&mut self) -> Option<&mut WithItem<R>>
Returns Some
if self
is a mutable reference of variant WithItem
, and None
otherwise.
sourcepub fn expect_with_item(self) -> WithItem<R>where
Self: Debug,
pub fn expect_with_item(self) -> WithItem<R>where
Self: Debug,
sourcepub fn with_item(self) -> Option<WithItem<R>>
pub fn with_item(self) -> Option<WithItem<R>>
Returns Some
if self
is of variant WithItem
, and None
otherwise.
sourcepub const fn is_match_case(&self) -> bool
pub const fn is_match_case(&self) -> bool
Returns true
if self
is of variant MatchCase
.
sourcepub fn as_match_case(&self) -> Option<&MatchCase<R>>
pub fn as_match_case(&self) -> Option<&MatchCase<R>>
Returns Some
if self
is a reference of variant MatchCase
, and None
otherwise.
sourcepub fn as_mut_match_case(&mut self) -> Option<&mut MatchCase<R>>
pub fn as_mut_match_case(&mut self) -> Option<&mut MatchCase<R>>
Returns Some
if self
is a mutable reference of variant MatchCase
, and None
otherwise.
sourcepub fn expect_match_case(self) -> MatchCase<R>where
Self: Debug,
pub fn expect_match_case(self) -> MatchCase<R>where
Self: Debug,
sourcepub fn match_case(self) -> Option<MatchCase<R>>
pub fn match_case(self) -> Option<MatchCase<R>>
Returns Some
if self
is of variant MatchCase
, and None
otherwise.
sourcepub const fn is_pattern(&self) -> bool
pub const fn is_pattern(&self) -> bool
Returns true
if self
is of variant Pattern
.
sourcepub fn as_pattern(&self) -> Option<&Pattern<R>>
pub fn as_pattern(&self) -> Option<&Pattern<R>>
Returns Some
if self
is a reference of variant Pattern
, and None
otherwise.
sourcepub fn as_mut_pattern(&mut self) -> Option<&mut Pattern<R>>
pub fn as_mut_pattern(&mut self) -> Option<&mut Pattern<R>>
Returns Some
if self
is a mutable reference of variant Pattern
, and None
otherwise.
sourcepub fn expect_pattern(self) -> Pattern<R>where
Self: Debug,
pub fn expect_pattern(self) -> Pattern<R>where
Self: Debug,
sourcepub fn pattern(self) -> Option<Pattern<R>>
pub fn pattern(self) -> Option<Pattern<R>>
Returns Some
if self
is of variant Pattern
, and None
otherwise.
sourcepub const fn is_type_ignore(&self) -> bool
pub const fn is_type_ignore(&self) -> bool
Returns true
if self
is of variant TypeIgnore
.
sourcepub fn as_type_ignore(&self) -> Option<&TypeIgnore<R>>
pub fn as_type_ignore(&self) -> Option<&TypeIgnore<R>>
Returns Some
if self
is a reference of variant TypeIgnore
, and None
otherwise.
sourcepub fn as_mut_type_ignore(&mut self) -> Option<&mut TypeIgnore<R>>
pub fn as_mut_type_ignore(&mut self) -> Option<&mut TypeIgnore<R>>
Returns Some
if self
is a mutable reference of variant TypeIgnore
, and None
otherwise.
sourcepub fn expect_type_ignore(self) -> TypeIgnore<R>where
Self: Debug,
pub fn expect_type_ignore(self) -> TypeIgnore<R>where
Self: Debug,
Unwraps the value, yielding the content of TypeIgnore
.
§Panics
Panics if the value is not TypeIgnore
, with a panic message including the content of self
.
sourcepub fn type_ignore(self) -> Option<TypeIgnore<R>>
pub fn type_ignore(self) -> Option<TypeIgnore<R>>
Returns Some
if self
is of variant TypeIgnore
, and None
otherwise.
sourcepub const fn is_type_param(&self) -> bool
pub const fn is_type_param(&self) -> bool
Returns true
if self
is of variant TypeParam
.
sourcepub fn as_type_param(&self) -> Option<&TypeParam<R>>
pub fn as_type_param(&self) -> Option<&TypeParam<R>>
Returns Some
if self
is a reference of variant TypeParam
, and None
otherwise.
sourcepub fn as_mut_type_param(&mut self) -> Option<&mut TypeParam<R>>
pub fn as_mut_type_param(&mut self) -> Option<&mut TypeParam<R>>
Returns Some
if self
is a mutable reference of variant TypeParam
, and None
otherwise.
sourcepub fn expect_type_param(self) -> TypeParam<R>where
Self: Debug,
pub fn expect_type_param(self) -> TypeParam<R>where
Self: Debug,
sourcepub fn type_param(self) -> Option<TypeParam<R>>
pub fn type_param(self) -> Option<TypeParam<R>>
Returns Some
if self
is of variant TypeParam
, and None
otherwise.
Trait Implementations§
source§impl<R> From<CmpOpIsNot> for Ast<R>
impl<R> From<CmpOpIsNot> for Ast<R>
source§fn from(_: CmpOpIsNot) -> Self
fn from(_: CmpOpIsNot) -> Self
source§impl<R> From<CmpOpNotEq> for Ast<R>
impl<R> From<CmpOpNotEq> for Ast<R>
source§fn from(_: CmpOpNotEq) -> Self
fn from(_: CmpOpNotEq) -> Self
source§impl<R> From<CmpOpNotIn> for Ast<R>
impl<R> From<CmpOpNotIn> for Ast<R>
source§fn from(_: CmpOpNotIn) -> Self
fn from(_: CmpOpNotIn) -> Self
source§impl<R> From<Comprehension<R>> for Ast<R>
impl<R> From<Comprehension<R>> for Ast<R>
source§fn from(node: Comprehension<R>) -> Self
fn from(node: Comprehension<R>) -> Self
source§impl<R> From<ExceptHandler<R>> for Ast<R>
impl<R> From<ExceptHandler<R>> for Ast<R>
source§fn from(node: ExceptHandler<R>) -> Self
fn from(node: ExceptHandler<R>) -> Self
source§impl<R> From<ExceptHandlerExceptHandler<R>> for Ast<R>
impl<R> From<ExceptHandlerExceptHandler<R>> for Ast<R>
source§fn from(payload: ExceptHandlerExceptHandler<R>) -> Self
fn from(payload: ExceptHandlerExceptHandler<R>) -> Self
source§impl<R> From<ExprAttribute<R>> for Ast<R>
impl<R> From<ExprAttribute<R>> for Ast<R>
source§fn from(payload: ExprAttribute<R>) -> Self
fn from(payload: ExprAttribute<R>) -> Self
source§impl<R> From<ExprBoolOp<R>> for Ast<R>
impl<R> From<ExprBoolOp<R>> for Ast<R>
source§fn from(payload: ExprBoolOp<R>) -> Self
fn from(payload: ExprBoolOp<R>) -> Self
source§impl<R> From<ExprCompare<R>> for Ast<R>
impl<R> From<ExprCompare<R>> for Ast<R>
source§fn from(payload: ExprCompare<R>) -> Self
fn from(payload: ExprCompare<R>) -> Self
source§impl<R> From<ExprConstant<R>> for Ast<R>
impl<R> From<ExprConstant<R>> for Ast<R>
source§fn from(payload: ExprConstant<R>) -> Self
fn from(payload: ExprConstant<R>) -> Self
source§impl<R> From<ExprContext> for Ast<R>
impl<R> From<ExprContext> for Ast<R>
source§fn from(node: ExprContext) -> Self
fn from(node: ExprContext) -> Self
source§impl<R> From<ExprContextDel> for Ast<R>
impl<R> From<ExprContextDel> for Ast<R>
source§fn from(_: ExprContextDel) -> Self
fn from(_: ExprContextDel) -> Self
source§impl<R> From<ExprContextLoad> for Ast<R>
impl<R> From<ExprContextLoad> for Ast<R>
source§fn from(_: ExprContextLoad) -> Self
fn from(_: ExprContextLoad) -> Self
source§impl<R> From<ExprContextStore> for Ast<R>
impl<R> From<ExprContextStore> for Ast<R>
source§fn from(_: ExprContextStore) -> Self
fn from(_: ExprContextStore) -> Self
source§impl<R> From<ExprDictComp<R>> for Ast<R>
impl<R> From<ExprDictComp<R>> for Ast<R>
source§fn from(payload: ExprDictComp<R>) -> Self
fn from(payload: ExprDictComp<R>) -> Self
source§impl<R> From<ExprFormattedValue<R>> for Ast<R>
impl<R> From<ExprFormattedValue<R>> for Ast<R>
source§fn from(payload: ExprFormattedValue<R>) -> Self
fn from(payload: ExprFormattedValue<R>) -> Self
source§impl<R> From<ExprGeneratorExp<R>> for Ast<R>
impl<R> From<ExprGeneratorExp<R>> for Ast<R>
source§fn from(payload: ExprGeneratorExp<R>) -> Self
fn from(payload: ExprGeneratorExp<R>) -> Self
source§impl<R> From<ExprJoinedStr<R>> for Ast<R>
impl<R> From<ExprJoinedStr<R>> for Ast<R>
source§fn from(payload: ExprJoinedStr<R>) -> Self
fn from(payload: ExprJoinedStr<R>) -> Self
source§impl<R> From<ExprLambda<R>> for Ast<R>
impl<R> From<ExprLambda<R>> for Ast<R>
source§fn from(payload: ExprLambda<R>) -> Self
fn from(payload: ExprLambda<R>) -> Self
source§impl<R> From<ExprListComp<R>> for Ast<R>
impl<R> From<ExprListComp<R>> for Ast<R>
source§fn from(payload: ExprListComp<R>) -> Self
fn from(payload: ExprListComp<R>) -> Self
source§impl<R> From<ExprNamedExpr<R>> for Ast<R>
impl<R> From<ExprNamedExpr<R>> for Ast<R>
source§fn from(payload: ExprNamedExpr<R>) -> Self
fn from(payload: ExprNamedExpr<R>) -> Self
source§impl<R> From<ExprSetComp<R>> for Ast<R>
impl<R> From<ExprSetComp<R>> for Ast<R>
source§fn from(payload: ExprSetComp<R>) -> Self
fn from(payload: ExprSetComp<R>) -> Self
source§impl<R> From<ExprStarred<R>> for Ast<R>
impl<R> From<ExprStarred<R>> for Ast<R>
source§fn from(payload: ExprStarred<R>) -> Self
fn from(payload: ExprStarred<R>) -> Self
source§impl<R> From<ExprSubscript<R>> for Ast<R>
impl<R> From<ExprSubscript<R>> for Ast<R>
source§fn from(payload: ExprSubscript<R>) -> Self
fn from(payload: ExprSubscript<R>) -> Self
source§impl<R> From<ExprUnaryOp<R>> for Ast<R>
impl<R> From<ExprUnaryOp<R>> for Ast<R>
source§fn from(payload: ExprUnaryOp<R>) -> Self
fn from(payload: ExprUnaryOp<R>) -> Self
source§impl<R> From<ExprYieldFrom<R>> for Ast<R>
impl<R> From<ExprYieldFrom<R>> for Ast<R>
source§fn from(payload: ExprYieldFrom<R>) -> Self
fn from(payload: ExprYieldFrom<R>) -> Self
source§impl<R> From<ModExpression<R>> for Ast<R>
impl<R> From<ModExpression<R>> for Ast<R>
source§fn from(payload: ModExpression<R>) -> Self
fn from(payload: ModExpression<R>) -> Self
source§impl<R> From<ModFunctionType<R>> for Ast<R>
impl<R> From<ModFunctionType<R>> for Ast<R>
source§fn from(payload: ModFunctionType<R>) -> Self
fn from(payload: ModFunctionType<R>) -> Self
source§impl<R> From<ModInteractive<R>> for Ast<R>
impl<R> From<ModInteractive<R>> for Ast<R>
source§fn from(payload: ModInteractive<R>) -> Self
fn from(payload: ModInteractive<R>) -> Self
source§impl<R> From<OperatorAdd> for Ast<R>
impl<R> From<OperatorAdd> for Ast<R>
source§fn from(_: OperatorAdd) -> Self
fn from(_: OperatorAdd) -> Self
source§impl<R> From<OperatorBitAnd> for Ast<R>
impl<R> From<OperatorBitAnd> for Ast<R>
source§fn from(_: OperatorBitAnd) -> Self
fn from(_: OperatorBitAnd) -> Self
source§impl<R> From<OperatorBitOr> for Ast<R>
impl<R> From<OperatorBitOr> for Ast<R>
source§fn from(_: OperatorBitOr) -> Self
fn from(_: OperatorBitOr) -> Self
source§impl<R> From<OperatorBitXor> for Ast<R>
impl<R> From<OperatorBitXor> for Ast<R>
source§fn from(_: OperatorBitXor) -> Self
fn from(_: OperatorBitXor) -> Self
source§impl<R> From<OperatorDiv> for Ast<R>
impl<R> From<OperatorDiv> for Ast<R>
source§fn from(_: OperatorDiv) -> Self
fn from(_: OperatorDiv) -> Self
source§impl<R> From<OperatorFloorDiv> for Ast<R>
impl<R> From<OperatorFloorDiv> for Ast<R>
source§fn from(_: OperatorFloorDiv) -> Self
fn from(_: OperatorFloorDiv) -> Self
source§impl<R> From<OperatorLShift> for Ast<R>
impl<R> From<OperatorLShift> for Ast<R>
source§fn from(_: OperatorLShift) -> Self
fn from(_: OperatorLShift) -> Self
source§impl<R> From<OperatorMatMult> for Ast<R>
impl<R> From<OperatorMatMult> for Ast<R>
source§fn from(_: OperatorMatMult) -> Self
fn from(_: OperatorMatMult) -> Self
source§impl<R> From<OperatorMod> for Ast<R>
impl<R> From<OperatorMod> for Ast<R>
source§fn from(_: OperatorMod) -> Self
fn from(_: OperatorMod) -> Self
source§impl<R> From<OperatorMult> for Ast<R>
impl<R> From<OperatorMult> for Ast<R>
source§fn from(_: OperatorMult) -> Self
fn from(_: OperatorMult) -> Self
source§impl<R> From<OperatorPow> for Ast<R>
impl<R> From<OperatorPow> for Ast<R>
source§fn from(_: OperatorPow) -> Self
fn from(_: OperatorPow) -> Self
source§impl<R> From<OperatorRShift> for Ast<R>
impl<R> From<OperatorRShift> for Ast<R>
source§fn from(_: OperatorRShift) -> Self
fn from(_: OperatorRShift) -> Self
source§impl<R> From<OperatorSub> for Ast<R>
impl<R> From<OperatorSub> for Ast<R>
source§fn from(_: OperatorSub) -> Self
fn from(_: OperatorSub) -> Self
source§impl<R> From<PatternMatchAs<R>> for Ast<R>
impl<R> From<PatternMatchAs<R>> for Ast<R>
source§fn from(payload: PatternMatchAs<R>) -> Self
fn from(payload: PatternMatchAs<R>) -> Self
source§impl<R> From<PatternMatchClass<R>> for Ast<R>
impl<R> From<PatternMatchClass<R>> for Ast<R>
source§fn from(payload: PatternMatchClass<R>) -> Self
fn from(payload: PatternMatchClass<R>) -> Self
source§impl<R> From<PatternMatchMapping<R>> for Ast<R>
impl<R> From<PatternMatchMapping<R>> for Ast<R>
source§fn from(payload: PatternMatchMapping<R>) -> Self
fn from(payload: PatternMatchMapping<R>) -> Self
source§impl<R> From<PatternMatchOr<R>> for Ast<R>
impl<R> From<PatternMatchOr<R>> for Ast<R>
source§fn from(payload: PatternMatchOr<R>) -> Self
fn from(payload: PatternMatchOr<R>) -> Self
source§impl<R> From<PatternMatchSequence<R>> for Ast<R>
impl<R> From<PatternMatchSequence<R>> for Ast<R>
source§fn from(payload: PatternMatchSequence<R>) -> Self
fn from(payload: PatternMatchSequence<R>) -> Self
source§impl<R> From<PatternMatchSingleton<R>> for Ast<R>
impl<R> From<PatternMatchSingleton<R>> for Ast<R>
source§fn from(payload: PatternMatchSingleton<R>) -> Self
fn from(payload: PatternMatchSingleton<R>) -> Self
source§impl<R> From<PatternMatchStar<R>> for Ast<R>
impl<R> From<PatternMatchStar<R>> for Ast<R>
source§fn from(payload: PatternMatchStar<R>) -> Self
fn from(payload: PatternMatchStar<R>) -> Self
source§impl<R> From<PatternMatchValue<R>> for Ast<R>
impl<R> From<PatternMatchValue<R>> for Ast<R>
source§fn from(payload: PatternMatchValue<R>) -> Self
fn from(payload: PatternMatchValue<R>) -> Self
source§impl<R> From<StmtAnnAssign<R>> for Ast<R>
impl<R> From<StmtAnnAssign<R>> for Ast<R>
source§fn from(payload: StmtAnnAssign<R>) -> Self
fn from(payload: StmtAnnAssign<R>) -> Self
source§impl<R> From<StmtAssert<R>> for Ast<R>
impl<R> From<StmtAssert<R>> for Ast<R>
source§fn from(payload: StmtAssert<R>) -> Self
fn from(payload: StmtAssert<R>) -> Self
source§impl<R> From<StmtAssign<R>> for Ast<R>
impl<R> From<StmtAssign<R>> for Ast<R>
source§fn from(payload: StmtAssign<R>) -> Self
fn from(payload: StmtAssign<R>) -> Self
source§impl<R> From<StmtAsyncFor<R>> for Ast<R>
impl<R> From<StmtAsyncFor<R>> for Ast<R>
source§fn from(payload: StmtAsyncFor<R>) -> Self
fn from(payload: StmtAsyncFor<R>) -> Self
source§impl<R> From<StmtAsyncFunctionDef<R>> for Ast<R>
impl<R> From<StmtAsyncFunctionDef<R>> for Ast<R>
source§fn from(payload: StmtAsyncFunctionDef<R>) -> Self
fn from(payload: StmtAsyncFunctionDef<R>) -> Self
source§impl<R> From<StmtAsyncWith<R>> for Ast<R>
impl<R> From<StmtAsyncWith<R>> for Ast<R>
source§fn from(payload: StmtAsyncWith<R>) -> Self
fn from(payload: StmtAsyncWith<R>) -> Self
source§impl<R> From<StmtAugAssign<R>> for Ast<R>
impl<R> From<StmtAugAssign<R>> for Ast<R>
source§fn from(payload: StmtAugAssign<R>) -> Self
fn from(payload: StmtAugAssign<R>) -> Self
source§impl<R> From<StmtClassDef<R>> for Ast<R>
impl<R> From<StmtClassDef<R>> for Ast<R>
source§fn from(payload: StmtClassDef<R>) -> Self
fn from(payload: StmtClassDef<R>) -> Self
source§impl<R> From<StmtContinue<R>> for Ast<R>
impl<R> From<StmtContinue<R>> for Ast<R>
source§fn from(payload: StmtContinue<R>) -> Self
fn from(payload: StmtContinue<R>) -> Self
source§impl<R> From<StmtDelete<R>> for Ast<R>
impl<R> From<StmtDelete<R>> for Ast<R>
source§fn from(payload: StmtDelete<R>) -> Self
fn from(payload: StmtDelete<R>) -> Self
source§impl<R> From<StmtFunctionDef<R>> for Ast<R>
impl<R> From<StmtFunctionDef<R>> for Ast<R>
source§fn from(payload: StmtFunctionDef<R>) -> Self
fn from(payload: StmtFunctionDef<R>) -> Self
source§impl<R> From<StmtGlobal<R>> for Ast<R>
impl<R> From<StmtGlobal<R>> for Ast<R>
source§fn from(payload: StmtGlobal<R>) -> Self
fn from(payload: StmtGlobal<R>) -> Self
source§impl<R> From<StmtImport<R>> for Ast<R>
impl<R> From<StmtImport<R>> for Ast<R>
source§fn from(payload: StmtImport<R>) -> Self
fn from(payload: StmtImport<R>) -> Self
source§impl<R> From<StmtImportFrom<R>> for Ast<R>
impl<R> From<StmtImportFrom<R>> for Ast<R>
source§fn from(payload: StmtImportFrom<R>) -> Self
fn from(payload: StmtImportFrom<R>) -> Self
source§impl<R> From<StmtNonlocal<R>> for Ast<R>
impl<R> From<StmtNonlocal<R>> for Ast<R>
source§fn from(payload: StmtNonlocal<R>) -> Self
fn from(payload: StmtNonlocal<R>) -> Self
source§impl<R> From<StmtReturn<R>> for Ast<R>
impl<R> From<StmtReturn<R>> for Ast<R>
source§fn from(payload: StmtReturn<R>) -> Self
fn from(payload: StmtReturn<R>) -> Self
source§impl<R> From<StmtTryStar<R>> for Ast<R>
impl<R> From<StmtTryStar<R>> for Ast<R>
source§fn from(payload: StmtTryStar<R>) -> Self
fn from(payload: StmtTryStar<R>) -> Self
source§impl<R> From<StmtTypeAlias<R>> for Ast<R>
impl<R> From<StmtTypeAlias<R>> for Ast<R>
source§fn from(payload: StmtTypeAlias<R>) -> Self
fn from(payload: StmtTypeAlias<R>) -> Self
source§impl<R> From<TypeIgnore<R>> for Ast<R>
impl<R> From<TypeIgnore<R>> for Ast<R>
source§fn from(node: TypeIgnore<R>) -> Self
fn from(node: TypeIgnore<R>) -> Self
source§impl<R> From<TypeIgnoreTypeIgnore<R>> for Ast<R>
impl<R> From<TypeIgnoreTypeIgnore<R>> for Ast<R>
source§fn from(payload: TypeIgnoreTypeIgnore<R>) -> Self
fn from(payload: TypeIgnoreTypeIgnore<R>) -> Self
source§impl<R> From<TypeParamParamSpec<R>> for Ast<R>
impl<R> From<TypeParamParamSpec<R>> for Ast<R>
source§fn from(payload: TypeParamParamSpec<R>) -> Self
fn from(payload: TypeParamParamSpec<R>) -> Self
source§impl<R> From<TypeParamTypeVar<R>> for Ast<R>
impl<R> From<TypeParamTypeVar<R>> for Ast<R>
source§fn from(payload: TypeParamTypeVar<R>) -> Self
fn from(payload: TypeParamTypeVar<R>) -> Self
source§impl<R> From<TypeParamTypeVarTuple<R>> for Ast<R>
impl<R> From<TypeParamTypeVarTuple<R>> for Ast<R>
source§fn from(payload: TypeParamTypeVarTuple<R>) -> Self
fn from(payload: TypeParamTypeVarTuple<R>) -> Self
source§impl<R> From<UnaryOpInvert> for Ast<R>
impl<R> From<UnaryOpInvert> for Ast<R>
source§fn from(_: UnaryOpInvert) -> Self
fn from(_: UnaryOpInvert) -> Self
source§impl<R> From<UnaryOpNot> for Ast<R>
impl<R> From<UnaryOpNot> for Ast<R>
source§fn from(_: UnaryOpNot) -> Self
fn from(_: UnaryOpNot) -> Self
source§impl<R> From<UnaryOpUAdd> for Ast<R>
impl<R> From<UnaryOpUAdd> for Ast<R>
source§fn from(_: UnaryOpUAdd) -> Self
fn from(_: UnaryOpUAdd) -> Self
source§impl<R> From<UnaryOpUSub> for Ast<R>
impl<R> From<UnaryOpUSub> for Ast<R>
source§fn from(_: UnaryOpUSub) -> Self
fn from(_: UnaryOpUSub) -> Self
impl<R> StructuralPartialEq for Ast<R>
Auto Trait Implementations§
impl<R> Freeze for Ast<R>where
R: Freeze,
impl<R> RefUnwindSafe for Ast<R>where
R: RefUnwindSafe,
impl<R> Send for Ast<R>where
R: Send,
impl<R> Sync for Ast<R>where
R: Sync,
impl<R> Unpin for Ast<R>where
R: Unpin,
impl<R> UnwindSafe for Ast<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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