Skip to main content

Ast

Enum 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>

Source

pub const fn is_module(&self) -> bool

Returns true if self is of variant Mod.

Source

pub fn as_module(&self) -> Option<&Mod<R>>

Returns Some if self is a reference of variant Mod, and None otherwise.

Source

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.

Source

pub fn expect_module(self) -> Mod<R>
where Self: Debug,

Unwraps the value, yielding the content of Mod.

§Panics

Panics if the value is not Mod. In debug builds the panic message includes the content of self.

Source

pub fn module(self) -> Option<Mod<R>>

Returns Some if self is of variant Mod, and None otherwise.

Source

pub const fn is_stmt(&self) -> bool

Returns true if self is of variant Stmt.

Source

pub fn as_stmt(&self) -> Option<&Stmt<R>>

Returns Some if self is a reference of variant Stmt, and None otherwise.

Source

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.

Source

pub fn expect_stmt(self) -> Stmt<R>
where Self: Debug,

Unwraps the value, yielding the content of Stmt.

§Panics

Panics if the value is not Stmt. In debug builds the panic message includes the content of self.

Source

pub fn stmt(self) -> Option<Stmt<R>>

Returns Some if self is of variant Stmt, and None otherwise.

Source

pub const fn is_expr(&self) -> bool

Returns true if self is of variant Expr.

Source

pub fn as_expr(&self) -> Option<&Expr<R>>

Returns Some if self is a reference of variant Expr, and None otherwise.

Source

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.

Source

pub fn expect_expr(self) -> Expr<R>
where Self: Debug,

Unwraps the value, yielding the content of Expr.

§Panics

Panics if the value is not Expr. In debug builds the panic message includes the content of self.

Source

pub fn expr(self) -> Option<Expr<R>>

Returns Some if self is of variant Expr, and None otherwise.

Source

pub const fn is_expr_context(&self) -> bool

Returns true if self is of variant ExprContext.

Source

pub fn as_expr_context(&self) -> Option<&ExprContext>

Returns Some if self is a reference of variant ExprContext, and None otherwise.

Source

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.

Source

pub fn expect_expr_context(self) -> ExprContext
where Self: Debug,

Unwraps the value, yielding the content of ExprContext.

§Panics

Panics if the value is not ExprContext. In debug builds the panic message includes the content of self.

Source

pub fn expr_context(self) -> Option<ExprContext>

Returns Some if self is of variant ExprContext, and None otherwise.

Source

pub const fn is_bool_op(&self) -> bool

Returns true if self is of variant BoolOp.

Source

pub fn as_bool_op(&self) -> Option<&BoolOp>

Returns Some if self is a reference of variant BoolOp, and None otherwise.

Source

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.

Source

pub fn expect_bool_op(self) -> BoolOp
where Self: Debug,

Unwraps the value, yielding the content of BoolOp.

§Panics

Panics if the value is not BoolOp. In debug builds the panic message includes the content of self.

Source

pub fn bool_op(self) -> Option<BoolOp>

Returns Some if self is of variant BoolOp, and None otherwise.

Source

pub const fn is_operator(&self) -> bool

Returns true if self is of variant Operator.

Source

pub fn as_operator(&self) -> Option<&Operator>

Returns Some if self is a reference of variant Operator, and None otherwise.

Source

pub fn as_mut_operator(&mut self) -> Option<&mut Operator>

Returns Some if self is a mutable reference of variant Operator, and None otherwise.

Source

pub fn expect_operator(self) -> Operator
where Self: Debug,

Unwraps the value, yielding the content of Operator.

§Panics

Panics if the value is not Operator. In debug builds the panic message includes the content of self.

Source

pub fn operator(self) -> Option<Operator>

Returns Some if self is of variant Operator, and None otherwise.

Source

pub const fn is_unary_op(&self) -> bool

Returns true if self is of variant UnaryOp.

Source

pub fn as_unary_op(&self) -> Option<&UnaryOp>

Returns Some if self is a reference of variant UnaryOp, and None otherwise.

Source

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.

Source

pub fn expect_unary_op(self) -> UnaryOp
where Self: Debug,

Unwraps the value, yielding the content of UnaryOp.

§Panics

Panics if the value is not UnaryOp. In debug builds the panic message includes the content of self.

Source

pub fn unary_op(self) -> Option<UnaryOp>

Returns Some if self is of variant UnaryOp, and None otherwise.

Source

pub const fn is_cmp_op(&self) -> bool

Returns true if self is of variant CmpOp.

Source

pub fn as_cmp_op(&self) -> Option<&CmpOp>

Returns Some if self is a reference of variant CmpOp, and None otherwise.

Source

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.

Source

pub fn expect_cmp_op(self) -> CmpOp
where Self: Debug,

Unwraps the value, yielding the content of CmpOp.

§Panics

Panics if the value is not CmpOp. In debug builds the panic message includes the content of self.

Source

pub fn cmp_op(self) -> Option<CmpOp>

Returns Some if self is of variant CmpOp, and None otherwise.

Source

pub const fn is_comprehension(&self) -> bool

Returns true if self is of variant Comprehension.

Source

pub fn as_comprehension(&self) -> Option<&Comprehension<R>>

Returns Some if self is a reference of variant Comprehension, and None otherwise.

Source

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.

Source

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. In debug builds the panic message includes the content of self.

Source

pub fn comprehension(self) -> Option<Comprehension<R>>

Returns Some if self is of variant Comprehension, and None otherwise.

Source

pub const fn is_except_handler(&self) -> bool

Returns true if self is of variant ExceptHandler.

Source

pub fn as_except_handler(&self) -> Option<&ExceptHandler<R>>

Returns Some if self is a reference of variant ExceptHandler, and None otherwise.

Source

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.

Source

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. In debug builds the panic message includes the content of self.

Source

pub fn except_handler(self) -> Option<ExceptHandler<R>>

Returns Some if self is of variant ExceptHandler, and None otherwise.

Source

pub const fn is_arguments(&self) -> bool

Returns true if self is of variant Arguments.

Source

pub fn as_arguments(&self) -> Option<&Arguments<R>>

Returns Some if self is a reference of variant Arguments, and None otherwise.

Source

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.

Source

pub fn expect_arguments(self) -> Arguments<R>
where Self: Debug,

Unwraps the value, yielding the content of Arguments.

§Panics

Panics if the value is not Arguments. In debug builds the panic message includes the content of self.

Source

pub fn arguments(self) -> Option<Arguments<R>>

Returns Some if self is of variant Arguments, and None otherwise.

Source

pub const fn is_arg(&self) -> bool

Returns true if self is of variant Arg.

Source

pub fn as_arg(&self) -> Option<&Arg<R>>

Returns Some if self is a reference of variant Arg, and None otherwise.

Source

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.

Source

pub fn expect_arg(self) -> Arg<R>
where Self: Debug,

Unwraps the value, yielding the content of Arg.

§Panics

Panics if the value is not Arg. In debug builds the panic message includes the content of self.

Source

pub fn arg(self) -> Option<Arg<R>>

Returns Some if self is of variant Arg, and None otherwise.

Source

pub const fn is_keyword(&self) -> bool

Returns true if self is of variant Keyword.

Source

pub fn as_keyword(&self) -> Option<&Keyword<R>>

Returns Some if self is a reference of variant Keyword, and None otherwise.

Source

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.

Source

pub fn expect_keyword(self) -> Keyword<R>
where Self: Debug,

Unwraps the value, yielding the content of Keyword.

§Panics

Panics if the value is not Keyword. In debug builds the panic message includes the content of self.

Source

pub fn keyword(self) -> Option<Keyword<R>>

Returns Some if self is of variant Keyword, and None otherwise.

Source

pub const fn is_alias(&self) -> bool

Returns true if self is of variant Alias.

Source

pub fn as_alias(&self) -> Option<&Alias<R>>

Returns Some if self is a reference of variant Alias, and None otherwise.

Source

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.

Source

pub fn expect_alias(self) -> Alias<R>
where Self: Debug,

Unwraps the value, yielding the content of Alias.

§Panics

Panics if the value is not Alias. In debug builds the panic message includes the content of self.

Source

pub fn alias(self) -> Option<Alias<R>>

Returns Some if self is of variant Alias, and None otherwise.

Source

pub const fn is_with_item(&self) -> bool

Returns true if self is of variant WithItem.

Source

pub fn as_with_item(&self) -> Option<&WithItem<R>>

Returns Some if self is a reference of variant WithItem, and None otherwise.

Source

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.

Source

pub fn expect_with_item(self) -> WithItem<R>
where Self: Debug,

Unwraps the value, yielding the content of WithItem.

§Panics

Panics if the value is not WithItem. In debug builds the panic message includes the content of self.

Source

pub fn with_item(self) -> Option<WithItem<R>>

Returns Some if self is of variant WithItem, and None otherwise.

Source

pub const fn is_match_case(&self) -> bool

Returns true if self is of variant MatchCase.

Source

pub fn as_match_case(&self) -> Option<&MatchCase<R>>

Returns Some if self is a reference of variant MatchCase, and None otherwise.

Source

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.

Source

pub fn expect_match_case(self) -> MatchCase<R>
where Self: Debug,

Unwraps the value, yielding the content of MatchCase.

§Panics

Panics if the value is not MatchCase. In debug builds the panic message includes the content of self.

Source

pub fn match_case(self) -> Option<MatchCase<R>>

Returns Some if self is of variant MatchCase, and None otherwise.

Source

pub const fn is_pattern(&self) -> bool

Returns true if self is of variant Pattern.

Source

pub fn as_pattern(&self) -> Option<&Pattern<R>>

Returns Some if self is a reference of variant Pattern, and None otherwise.

Source

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.

Source

pub fn expect_pattern(self) -> Pattern<R>
where Self: Debug,

Unwraps the value, yielding the content of Pattern.

§Panics

Panics if the value is not Pattern. In debug builds the panic message includes the content of self.

Source

pub fn pattern(self) -> Option<Pattern<R>>

Returns Some if self is of variant Pattern, and None otherwise.

Source

pub const fn is_type_ignore(&self) -> bool

Returns true if self is of variant TypeIgnore.

Source

pub fn as_type_ignore(&self) -> Option<&TypeIgnore<R>>

Returns Some if self is a reference of variant TypeIgnore, and None otherwise.

Source

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.

Source

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. In debug builds the panic message includes the content of self.

Source

pub fn type_ignore(self) -> Option<TypeIgnore<R>>

Returns Some if self is of variant TypeIgnore, and None otherwise.

Source

pub const fn is_type_param(&self) -> bool

Returns true if self is of variant TypeParam.

Source

pub fn as_type_param(&self) -> Option<&TypeParam<R>>

Returns Some if self is a reference of variant TypeParam, and None otherwise.

Source

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.

Source

pub fn expect_type_param(self) -> TypeParam<R>
where Self: Debug,

Unwraps the value, yielding the content of TypeParam.

§Panics

Panics if the value is not TypeParam. In debug builds the panic message includes the content of self.

Source

pub fn type_param(self) -> Option<TypeParam<R>>

Returns Some if self is of variant TypeParam, and None otherwise.

Trait Implementations§

Source§

impl<R: Clone> Clone for Ast<R>

Source§

fn clone(&self) -> Ast<R>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: Debug> Debug for Ast<R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<R> From<Alias<R>> for Ast<R>

Source§

fn from(node: Alias<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Arg<R>> for Ast<R>

Source§

fn from(node: Arg<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Arguments<R>> for Ast<R>

Source§

fn from(node: Arguments<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<BoolOp> for Ast<R>

Source§

fn from(node: BoolOp) -> Self

Converts to this type from the input type.
Source§

impl<R> From<BoolOpAnd> for Ast<R>

Source§

fn from(_: BoolOpAnd) -> Self

Converts to this type from the input type.
Source§

impl<R> From<BoolOpOr> for Ast<R>

Source§

fn from(_: BoolOpOr) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOp> for Ast<R>

Source§

fn from(node: CmpOp) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpEq> for Ast<R>

Source§

fn from(_: CmpOpEq) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpGt> for Ast<R>

Source§

fn from(_: CmpOpGt) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpGtE> for Ast<R>

Source§

fn from(_: CmpOpGtE) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpIn> for Ast<R>

Source§

fn from(_: CmpOpIn) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpIs> for Ast<R>

Source§

fn from(_: CmpOpIs) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpIsNot> for Ast<R>

Source§

fn from(_: CmpOpIsNot) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpLt> for Ast<R>

Source§

fn from(_: CmpOpLt) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpLtE> for Ast<R>

Source§

fn from(_: CmpOpLtE) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpNotEq> for Ast<R>

Source§

fn from(_: CmpOpNotEq) -> Self

Converts to this type from the input type.
Source§

impl<R> From<CmpOpNotIn> for Ast<R>

Source§

fn from(_: CmpOpNotIn) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Comprehension<R>> for Ast<R>

Source§

fn from(node: Comprehension<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExceptHandler<R>> for Ast<R>

Source§

fn from(node: ExceptHandler<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExceptHandlerExceptHandler<R>> for Ast<R>

Source§

fn from(payload: ExceptHandlerExceptHandler<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Expr<R>> for Ast<R>

Source§

fn from(node: Expr<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprAttribute<R>> for Ast<R>

Source§

fn from(payload: ExprAttribute<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprAwait<R>> for Ast<R>

Source§

fn from(payload: ExprAwait<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprBinOp<R>> for Ast<R>

Source§

fn from(payload: ExprBinOp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprBoolOp<R>> for Ast<R>

Source§

fn from(payload: ExprBoolOp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprCall<R>> for Ast<R>

Source§

fn from(payload: ExprCall<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprCompare<R>> for Ast<R>

Source§

fn from(payload: ExprCompare<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprConstant<R>> for Ast<R>

Source§

fn from(payload: ExprConstant<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprContext> for Ast<R>

Source§

fn from(node: ExprContext) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprContextDel> for Ast<R>

Source§

fn from(_: ExprContextDel) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprContextLoad> for Ast<R>

Source§

fn from(_: ExprContextLoad) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprContextStore> for Ast<R>

Source§

fn from(_: ExprContextStore) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprDict<R>> for Ast<R>

Source§

fn from(payload: ExprDict<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprDictComp<R>> for Ast<R>

Source§

fn from(payload: ExprDictComp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprFormattedValue<R>> for Ast<R>

Source§

fn from(payload: ExprFormattedValue<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprGeneratorExp<R>> for Ast<R>

Source§

fn from(payload: ExprGeneratorExp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprIfExp<R>> for Ast<R>

Source§

fn from(payload: ExprIfExp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprJoinedStr<R>> for Ast<R>

Source§

fn from(payload: ExprJoinedStr<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprLambda<R>> for Ast<R>

Source§

fn from(payload: ExprLambda<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprList<R>> for Ast<R>

Source§

fn from(payload: ExprList<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprListComp<R>> for Ast<R>

Source§

fn from(payload: ExprListComp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprName<R>> for Ast<R>

Source§

fn from(payload: ExprName<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprNamedExpr<R>> for Ast<R>

Source§

fn from(payload: ExprNamedExpr<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprSet<R>> for Ast<R>

Source§

fn from(payload: ExprSet<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprSetComp<R>> for Ast<R>

Source§

fn from(payload: ExprSetComp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprSlice<R>> for Ast<R>

Source§

fn from(payload: ExprSlice<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprStarred<R>> for Ast<R>

Source§

fn from(payload: ExprStarred<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprSubscript<R>> for Ast<R>

Source§

fn from(payload: ExprSubscript<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprTuple<R>> for Ast<R>

Source§

fn from(payload: ExprTuple<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprUnaryOp<R>> for Ast<R>

Source§

fn from(payload: ExprUnaryOp<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprYield<R>> for Ast<R>

Source§

fn from(payload: ExprYield<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ExprYieldFrom<R>> for Ast<R>

Source§

fn from(payload: ExprYieldFrom<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Keyword<R>> for Ast<R>

Source§

fn from(node: Keyword<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<MatchCase<R>> for Ast<R>

Source§

fn from(node: MatchCase<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Mod<R>> for Ast<R>

Source§

fn from(node: Mod<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ModExpression<R>> for Ast<R>

Source§

fn from(payload: ModExpression<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ModFunctionType<R>> for Ast<R>

Source§

fn from(payload: ModFunctionType<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ModInteractive<R>> for Ast<R>

Source§

fn from(payload: ModInteractive<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<ModModule<R>> for Ast<R>

Source§

fn from(payload: ModModule<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Operator> for Ast<R>

Source§

fn from(node: Operator) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorAdd> for Ast<R>

Source§

fn from(_: OperatorAdd) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorBitAnd> for Ast<R>

Source§

fn from(_: OperatorBitAnd) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorBitOr> for Ast<R>

Source§

fn from(_: OperatorBitOr) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorBitXor> for Ast<R>

Source§

fn from(_: OperatorBitXor) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorDiv> for Ast<R>

Source§

fn from(_: OperatorDiv) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorFloorDiv> for Ast<R>

Source§

fn from(_: OperatorFloorDiv) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorLShift> for Ast<R>

Source§

fn from(_: OperatorLShift) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorMatMult> for Ast<R>

Source§

fn from(_: OperatorMatMult) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorMod> for Ast<R>

Source§

fn from(_: OperatorMod) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorMult> for Ast<R>

Source§

fn from(_: OperatorMult) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorPow> for Ast<R>

Source§

fn from(_: OperatorPow) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorRShift> for Ast<R>

Source§

fn from(_: OperatorRShift) -> Self

Converts to this type from the input type.
Source§

impl<R> From<OperatorSub> for Ast<R>

Source§

fn from(_: OperatorSub) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Pattern<R>> for Ast<R>

Source§

fn from(node: Pattern<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchAs<R>> for Ast<R>

Source§

fn from(payload: PatternMatchAs<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchClass<R>> for Ast<R>

Source§

fn from(payload: PatternMatchClass<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchMapping<R>> for Ast<R>

Source§

fn from(payload: PatternMatchMapping<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchOr<R>> for Ast<R>

Source§

fn from(payload: PatternMatchOr<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchSequence<R>> for Ast<R>

Source§

fn from(payload: PatternMatchSequence<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchSingleton<R>> for Ast<R>

Source§

fn from(payload: PatternMatchSingleton<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchStar<R>> for Ast<R>

Source§

fn from(payload: PatternMatchStar<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<PatternMatchValue<R>> for Ast<R>

Source§

fn from(payload: PatternMatchValue<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<Stmt<R>> for Ast<R>

Source§

fn from(node: Stmt<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAnnAssign<R>> for Ast<R>

Source§

fn from(payload: StmtAnnAssign<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAssert<R>> for Ast<R>

Source§

fn from(payload: StmtAssert<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAssign<R>> for Ast<R>

Source§

fn from(payload: StmtAssign<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAsyncFor<R>> for Ast<R>

Source§

fn from(payload: StmtAsyncFor<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAsyncFunctionDef<R>> for Ast<R>

Source§

fn from(payload: StmtAsyncFunctionDef<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAsyncWith<R>> for Ast<R>

Source§

fn from(payload: StmtAsyncWith<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtAugAssign<R>> for Ast<R>

Source§

fn from(payload: StmtAugAssign<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtBreak<R>> for Ast<R>

Source§

fn from(payload: StmtBreak<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtClassDef<R>> for Ast<R>

Source§

fn from(payload: StmtClassDef<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtContinue<R>> for Ast<R>

Source§

fn from(payload: StmtContinue<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtDelete<R>> for Ast<R>

Source§

fn from(payload: StmtDelete<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtExpr<R>> for Ast<R>

Source§

fn from(payload: StmtExpr<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtFor<R>> for Ast<R>

Source§

fn from(payload: StmtFor<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtFunctionDef<R>> for Ast<R>

Source§

fn from(payload: StmtFunctionDef<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtGlobal<R>> for Ast<R>

Source§

fn from(payload: StmtGlobal<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtIf<R>> for Ast<R>

Source§

fn from(payload: StmtIf<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtImport<R>> for Ast<R>

Source§

fn from(payload: StmtImport<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtImportFrom<R>> for Ast<R>

Source§

fn from(payload: StmtImportFrom<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtMatch<R>> for Ast<R>

Source§

fn from(payload: StmtMatch<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtNonlocal<R>> for Ast<R>

Source§

fn from(payload: StmtNonlocal<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtPass<R>> for Ast<R>

Source§

fn from(payload: StmtPass<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtRaise<R>> for Ast<R>

Source§

fn from(payload: StmtRaise<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtReturn<R>> for Ast<R>

Source§

fn from(payload: StmtReturn<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtTry<R>> for Ast<R>

Source§

fn from(payload: StmtTry<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtTryStar<R>> for Ast<R>

Source§

fn from(payload: StmtTryStar<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtTypeAlias<R>> for Ast<R>

Source§

fn from(payload: StmtTypeAlias<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtWhile<R>> for Ast<R>

Source§

fn from(payload: StmtWhile<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<StmtWith<R>> for Ast<R>

Source§

fn from(payload: StmtWith<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<TypeIgnore<R>> for Ast<R>

Source§

fn from(node: TypeIgnore<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<TypeIgnoreTypeIgnore<R>> for Ast<R>

Source§

fn from(payload: TypeIgnoreTypeIgnore<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<TypeParam<R>> for Ast<R>

Source§

fn from(node: TypeParam<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<TypeParamParamSpec<R>> for Ast<R>

Source§

fn from(payload: TypeParamParamSpec<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<TypeParamTypeVar<R>> for Ast<R>

Source§

fn from(payload: TypeParamTypeVar<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<TypeParamTypeVarTuple<R>> for Ast<R>

Source§

fn from(payload: TypeParamTypeVarTuple<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<UnaryOp> for Ast<R>

Source§

fn from(node: UnaryOp) -> Self

Converts to this type from the input type.
Source§

impl<R> From<UnaryOpInvert> for Ast<R>

Source§

fn from(_: UnaryOpInvert) -> Self

Converts to this type from the input type.
Source§

impl<R> From<UnaryOpNot> for Ast<R>

Source§

fn from(_: UnaryOpNot) -> Self

Converts to this type from the input type.
Source§

impl<R> From<UnaryOpUAdd> for Ast<R>

Source§

fn from(_: UnaryOpUAdd) -> Self

Converts to this type from the input type.
Source§

impl<R> From<UnaryOpUSub> for Ast<R>

Source§

fn from(_: UnaryOpUSub) -> Self

Converts to this type from the input type.
Source§

impl<R> From<WithItem<R>> for Ast<R>

Source§

fn from(node: WithItem<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> Node for Ast<R>

Source§

const NAME: &'static str = "AST"

Source§

const FIELD_NAMES: &'static [&'static str]

Source§

impl<R: PartialEq> PartialEq for Ast<R>

Source§

fn eq(&self, other: &Ast<R>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<R: PartialEq> StructuralPartialEq for Ast<R>

Auto Trait Implementations§

§

impl<R> Freeze for Ast<R>

§

impl<R> RefUnwindSafe for Ast<R>

§

impl<R> Send for Ast<R>

§

impl<R> Sync for Ast<R>

§

impl<R> Unpin for Ast<R>

§

impl<R> UnsafeUnpin for Ast<R>

§

impl<R> UnwindSafe for Ast<R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

impl<T> ToDebugString for T
where T: Debug,

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U