Skip to main content

AnyNodeRef

Enum AnyNodeRef 

Source
pub enum AnyNodeRef<'a> {
Show 95 variants ModModule(&'a ModModule), ModExpression(&'a ModExpression), StmtFunctionDef(&'a StmtFunctionDef), StmtClassDef(&'a StmtClassDef), StmtReturn(&'a StmtReturn), StmtDelete(&'a StmtDelete), StmtTypeAlias(&'a StmtTypeAlias), StmtAssign(&'a StmtAssign), StmtAugAssign(&'a StmtAugAssign), StmtAnnAssign(&'a StmtAnnAssign), StmtFor(&'a StmtFor), StmtWhile(&'a StmtWhile), StmtIf(&'a StmtIf), StmtWith(&'a StmtWith), StmtMatch(&'a StmtMatch), StmtRaise(&'a StmtRaise), StmtTry(&'a StmtTry), StmtAssert(&'a StmtAssert), StmtImport(&'a StmtImport), StmtImportFrom(&'a StmtImportFrom), StmtGlobal(&'a StmtGlobal), StmtNonlocal(&'a StmtNonlocal), StmtExpr(&'a StmtExpr), StmtPass(&'a StmtPass), StmtBreak(&'a StmtBreak), StmtContinue(&'a StmtContinue), StmtIpyEscapeCommand(&'a StmtIpyEscapeCommand), ExprBoolOp(&'a ExprBoolOp), ExprNamed(&'a ExprNamed), ExprBinOp(&'a ExprBinOp), ExprUnaryOp(&'a ExprUnaryOp), ExprLambda(&'a ExprLambda), ExprIf(&'a ExprIf), ExprDict(&'a ExprDict), ExprSet(&'a ExprSet), ExprListComp(&'a ExprListComp), ExprSetComp(&'a ExprSetComp), ExprDictComp(&'a ExprDictComp), ExprGenerator(&'a ExprGenerator), ExprAwait(&'a ExprAwait), ExprYield(&'a ExprYield), ExprYieldFrom(&'a ExprYieldFrom), ExprCompare(&'a ExprCompare), ExprCall(&'a ExprCall), ExprFString(&'a ExprFString), ExprTString(&'a ExprTString), ExprStringLiteral(&'a ExprStringLiteral), ExprBytesLiteral(&'a ExprBytesLiteral), ExprNumberLiteral(&'a ExprNumberLiteral), ExprBooleanLiteral(&'a ExprBooleanLiteral), ExprNoneLiteral(&'a ExprNoneLiteral), ExprEllipsisLiteral(&'a ExprEllipsisLiteral), ExprConstant(&'a ExprConstant), ExprAttribute(&'a ExprAttribute), ExprSubscript(&'a ExprSubscript), ExprStarred(&'a ExprStarred), ExprName(&'a ExprName), ExprList(&'a ExprList), ExprTuple(&'a ExprTuple), ExprSlice(&'a ExprSlice), ExprIpyEscapeCommand(&'a ExprIpyEscapeCommand), ExceptHandlerExceptHandler(&'a ExceptHandlerExceptHandler), InterpolatedElement(&'a InterpolatedElement), InterpolatedStringLiteralElement(&'a InterpolatedStringLiteralElement), PatternMatchValue(&'a PatternMatchValue), PatternMatchSingleton(&'a PatternMatchSingleton), PatternMatchSequence(&'a PatternMatchSequence), PatternMatchMapping(&'a PatternMatchMapping), PatternMatchClass(&'a PatternMatchClass), PatternMatchStar(&'a PatternMatchStar), PatternMatchAs(&'a PatternMatchAs), PatternMatchOr(&'a PatternMatchOr), TypeParamTypeVar(&'a TypeParamTypeVar), TypeParamTypeVarTuple(&'a TypeParamTypeVarTuple), TypeParamParamSpec(&'a TypeParamParamSpec), InterpolatedStringFormatSpec(&'a InterpolatedStringFormatSpec), PatternArguments(&'a PatternArguments), PatternKeyword(&'a PatternKeyword), Comprehension(&'a Comprehension), Arguments(&'a Arguments), Parameters(&'a Parameters), Parameter(&'a Parameter), ParameterWithDefault(&'a ParameterWithDefault), Keyword(&'a Keyword), Alias(&'a Alias), WithItem(&'a WithItem), MatchCase(&'a MatchCase), Decorator(&'a Decorator), ElifElseClause(&'a ElifElseClause), TypeParams(&'a TypeParams), FString(&'a FString), TString(&'a TString), StringLiteral(&'a StringLiteral), BytesLiteral(&'a BytesLiteral), Identifier(&'a Identifier),
}
Expand description

A flattened enumeration of all AST nodes.

Variants§

§

ModModule(&'a ModModule)

§

ModExpression(&'a ModExpression)

§

StmtFunctionDef(&'a StmtFunctionDef)

§

StmtClassDef(&'a StmtClassDef)

§

StmtReturn(&'a StmtReturn)

§

StmtDelete(&'a StmtDelete)

§

StmtTypeAlias(&'a StmtTypeAlias)

§

StmtAssign(&'a StmtAssign)

§

StmtAugAssign(&'a StmtAugAssign)

§

StmtAnnAssign(&'a StmtAnnAssign)

§

StmtFor(&'a StmtFor)

§

StmtWhile(&'a StmtWhile)

§

StmtIf(&'a StmtIf)

§

StmtWith(&'a StmtWith)

§

StmtMatch(&'a StmtMatch)

§

StmtRaise(&'a StmtRaise)

§

StmtTry(&'a StmtTry)

§

StmtAssert(&'a StmtAssert)

§

StmtImport(&'a StmtImport)

§

StmtImportFrom(&'a StmtImportFrom)

§

StmtGlobal(&'a StmtGlobal)

§

StmtNonlocal(&'a StmtNonlocal)

§

StmtExpr(&'a StmtExpr)

§

StmtPass(&'a StmtPass)

§

StmtBreak(&'a StmtBreak)

§

StmtContinue(&'a StmtContinue)

§

StmtIpyEscapeCommand(&'a StmtIpyEscapeCommand)

§

ExprBoolOp(&'a ExprBoolOp)

§

ExprNamed(&'a ExprNamed)

§

ExprBinOp(&'a ExprBinOp)

§

ExprUnaryOp(&'a ExprUnaryOp)

§

ExprLambda(&'a ExprLambda)

§

ExprIf(&'a ExprIf)

§

ExprDict(&'a ExprDict)

§

ExprSet(&'a ExprSet)

§

ExprListComp(&'a ExprListComp)

§

ExprSetComp(&'a ExprSetComp)

§

ExprDictComp(&'a ExprDictComp)

§

ExprGenerator(&'a ExprGenerator)

§

ExprAwait(&'a ExprAwait)

§

ExprYield(&'a ExprYield)

§

ExprYieldFrom(&'a ExprYieldFrom)

§

ExprCompare(&'a ExprCompare)

§

ExprCall(&'a ExprCall)

§

ExprFString(&'a ExprFString)

§

ExprTString(&'a ExprTString)

§

ExprStringLiteral(&'a ExprStringLiteral)

§

ExprBytesLiteral(&'a ExprBytesLiteral)

§

ExprNumberLiteral(&'a ExprNumberLiteral)

§

ExprBooleanLiteral(&'a ExprBooleanLiteral)

§

ExprNoneLiteral(&'a ExprNoneLiteral)

§

ExprEllipsisLiteral(&'a ExprEllipsisLiteral)

§

ExprConstant(&'a ExprConstant)

§

ExprAttribute(&'a ExprAttribute)

§

ExprSubscript(&'a ExprSubscript)

§

ExprStarred(&'a ExprStarred)

§

ExprName(&'a ExprName)

§

ExprList(&'a ExprList)

§

ExprTuple(&'a ExprTuple)

§

ExprSlice(&'a ExprSlice)

§

ExprIpyEscapeCommand(&'a ExprIpyEscapeCommand)

§

ExceptHandlerExceptHandler(&'a ExceptHandlerExceptHandler)

§

InterpolatedElement(&'a InterpolatedElement)

§

InterpolatedStringLiteralElement(&'a InterpolatedStringLiteralElement)

§

PatternMatchValue(&'a PatternMatchValue)

§

PatternMatchSingleton(&'a PatternMatchSingleton)

§

PatternMatchSequence(&'a PatternMatchSequence)

§

PatternMatchMapping(&'a PatternMatchMapping)

§

PatternMatchClass(&'a PatternMatchClass)

§

PatternMatchStar(&'a PatternMatchStar)

§

PatternMatchAs(&'a PatternMatchAs)

§

PatternMatchOr(&'a PatternMatchOr)

§

TypeParamTypeVar(&'a TypeParamTypeVar)

§

TypeParamTypeVarTuple(&'a TypeParamTypeVarTuple)

§

TypeParamParamSpec(&'a TypeParamParamSpec)

§

InterpolatedStringFormatSpec(&'a InterpolatedStringFormatSpec)

§

PatternArguments(&'a PatternArguments)

§

PatternKeyword(&'a PatternKeyword)

§

Comprehension(&'a Comprehension)

§

Arguments(&'a Arguments)

§

Parameters(&'a Parameters)

§

Parameter(&'a Parameter)

§

ParameterWithDefault(&'a ParameterWithDefault)

§

Keyword(&'a Keyword)

§

Alias(&'a Alias)

§

WithItem(&'a WithItem)

§

MatchCase(&'a MatchCase)

§

Decorator(&'a Decorator)

§

ElifElseClause(&'a ElifElseClause)

§

TypeParams(&'a TypeParams)

§

FString(&'a FString)

§

TString(&'a TString)

§

StringLiteral(&'a StringLiteral)

§

BytesLiteral(&'a BytesLiteral)

§

Identifier(&'a Identifier)

Implementations§

Source§

impl<'a> AnyNodeRef<'a>

Source

pub const fn is_mod_module(&self) -> bool

Returns true if self is of variant ModModule.

Source

pub fn as_mod_module(&self) -> Option<&&'a ModModule>

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

Source

pub fn as_mut_mod_module(&mut self) -> Option<&mut &'a ModModule>

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

Source

pub fn expect_mod_module(self) -> &'a ModModule
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ModModule.

§Panics

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

Source

pub fn mod_module(self) -> Option<&'a ModModule>

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

Source

pub const fn is_mod_expression(&self) -> bool

Returns true if self is of variant ModExpression.

Source

pub fn as_mod_expression(&self) -> Option<&&'a ModExpression>

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

Source

pub fn as_mut_mod_expression(&mut self) -> Option<&mut &'a ModExpression>

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

Source

pub fn expect_mod_expression(self) -> &'a ModExpression
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ModExpression.

§Panics

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

Source

pub fn mod_expression(self) -> Option<&'a ModExpression>

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

Source

pub const fn is_stmt_function_def(&self) -> bool

Returns true if self is of variant StmtFunctionDef.

Source

pub fn as_stmt_function_def(&self) -> Option<&&'a StmtFunctionDef>

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

Source

pub fn as_mut_stmt_function_def(&mut self) -> Option<&mut &'a StmtFunctionDef>

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

Source

pub fn expect_stmt_function_def(self) -> &'a StmtFunctionDef
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtFunctionDef.

§Panics

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

Source

pub fn stmt_function_def(self) -> Option<&'a StmtFunctionDef>

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

Source

pub const fn is_stmt_class_def(&self) -> bool

Returns true if self is of variant StmtClassDef.

Source

pub fn as_stmt_class_def(&self) -> Option<&&'a StmtClassDef>

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

Source

pub fn as_mut_stmt_class_def(&mut self) -> Option<&mut &'a StmtClassDef>

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

Source

pub fn expect_stmt_class_def(self) -> &'a StmtClassDef
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtClassDef.

§Panics

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

Source

pub fn stmt_class_def(self) -> Option<&'a StmtClassDef>

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

Source

pub const fn is_stmt_return(&self) -> bool

Returns true if self is of variant StmtReturn.

Source

pub fn as_stmt_return(&self) -> Option<&&'a StmtReturn>

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

Source

pub fn as_mut_stmt_return(&mut self) -> Option<&mut &'a StmtReturn>

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

Source

pub fn expect_stmt_return(self) -> &'a StmtReturn
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtReturn.

§Panics

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

Source

pub fn stmt_return(self) -> Option<&'a StmtReturn>

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

Source

pub const fn is_stmt_delete(&self) -> bool

Returns true if self is of variant StmtDelete.

Source

pub fn as_stmt_delete(&self) -> Option<&&'a StmtDelete>

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

Source

pub fn as_mut_stmt_delete(&mut self) -> Option<&mut &'a StmtDelete>

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

Source

pub fn expect_stmt_delete(self) -> &'a StmtDelete
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtDelete.

§Panics

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

Source

pub fn stmt_delete(self) -> Option<&'a StmtDelete>

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

Source

pub const fn is_stmt_type_alias(&self) -> bool

Returns true if self is of variant StmtTypeAlias.

Source

pub fn as_stmt_type_alias(&self) -> Option<&&'a StmtTypeAlias>

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

Source

pub fn as_mut_stmt_type_alias(&mut self) -> Option<&mut &'a StmtTypeAlias>

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

Source

pub fn expect_stmt_type_alias(self) -> &'a StmtTypeAlias
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtTypeAlias.

§Panics

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

Source

pub fn stmt_type_alias(self) -> Option<&'a StmtTypeAlias>

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

Source

pub const fn is_stmt_assign(&self) -> bool

Returns true if self is of variant StmtAssign.

Source

pub fn as_stmt_assign(&self) -> Option<&&'a StmtAssign>

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

Source

pub fn as_mut_stmt_assign(&mut self) -> Option<&mut &'a StmtAssign>

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

Source

pub fn expect_stmt_assign(self) -> &'a StmtAssign
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtAssign.

§Panics

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

Source

pub fn stmt_assign(self) -> Option<&'a StmtAssign>

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

Source

pub const fn is_stmt_aug_assign(&self) -> bool

Returns true if self is of variant StmtAugAssign.

Source

pub fn as_stmt_aug_assign(&self) -> Option<&&'a StmtAugAssign>

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

Source

pub fn as_mut_stmt_aug_assign(&mut self) -> Option<&mut &'a StmtAugAssign>

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

Source

pub fn expect_stmt_aug_assign(self) -> &'a StmtAugAssign
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtAugAssign.

§Panics

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

Source

pub fn stmt_aug_assign(self) -> Option<&'a StmtAugAssign>

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

Source

pub const fn is_stmt_ann_assign(&self) -> bool

Returns true if self is of variant StmtAnnAssign.

Source

pub fn as_stmt_ann_assign(&self) -> Option<&&'a StmtAnnAssign>

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

Source

pub fn as_mut_stmt_ann_assign(&mut self) -> Option<&mut &'a StmtAnnAssign>

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

Source

pub fn expect_stmt_ann_assign(self) -> &'a StmtAnnAssign
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtAnnAssign.

§Panics

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

Source

pub fn stmt_ann_assign(self) -> Option<&'a StmtAnnAssign>

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

Source

pub const fn is_stmt_for(&self) -> bool

Returns true if self is of variant StmtFor.

Source

pub fn as_stmt_for(&self) -> Option<&&'a StmtFor>

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

Source

pub fn as_mut_stmt_for(&mut self) -> Option<&mut &'a StmtFor>

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

Source

pub fn expect_stmt_for(self) -> &'a StmtFor
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtFor.

§Panics

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

Source

pub fn stmt_for(self) -> Option<&'a StmtFor>

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

Source

pub const fn is_stmt_while(&self) -> bool

Returns true if self is of variant StmtWhile.

Source

pub fn as_stmt_while(&self) -> Option<&&'a StmtWhile>

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

Source

pub fn as_mut_stmt_while(&mut self) -> Option<&mut &'a StmtWhile>

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

Source

pub fn expect_stmt_while(self) -> &'a StmtWhile
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtWhile.

§Panics

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

Source

pub fn stmt_while(self) -> Option<&'a StmtWhile>

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

Source

pub const fn is_stmt_if(&self) -> bool

Returns true if self is of variant StmtIf.

Source

pub fn as_stmt_if(&self) -> Option<&&'a StmtIf>

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

Source

pub fn as_mut_stmt_if(&mut self) -> Option<&mut &'a StmtIf>

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

Source

pub fn expect_stmt_if(self) -> &'a StmtIf
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtIf.

§Panics

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

Source

pub fn stmt_if(self) -> Option<&'a StmtIf>

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

Source

pub const fn is_stmt_with(&self) -> bool

Returns true if self is of variant StmtWith.

Source

pub fn as_stmt_with(&self) -> Option<&&'a StmtWith>

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

Source

pub fn as_mut_stmt_with(&mut self) -> Option<&mut &'a StmtWith>

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

Source

pub fn expect_stmt_with(self) -> &'a StmtWith
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtWith.

§Panics

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

Source

pub fn stmt_with(self) -> Option<&'a StmtWith>

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

Source

pub const fn is_stmt_match(&self) -> bool

Returns true if self is of variant StmtMatch.

Source

pub fn as_stmt_match(&self) -> Option<&&'a StmtMatch>

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

Source

pub fn as_mut_stmt_match(&mut self) -> Option<&mut &'a StmtMatch>

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

Source

pub fn expect_stmt_match(self) -> &'a StmtMatch
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtMatch.

§Panics

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

Source

pub fn stmt_match(self) -> Option<&'a StmtMatch>

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

Source

pub const fn is_stmt_raise(&self) -> bool

Returns true if self is of variant StmtRaise.

Source

pub fn as_stmt_raise(&self) -> Option<&&'a StmtRaise>

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

Source

pub fn as_mut_stmt_raise(&mut self) -> Option<&mut &'a StmtRaise>

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

Source

pub fn expect_stmt_raise(self) -> &'a StmtRaise
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtRaise.

§Panics

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

Source

pub fn stmt_raise(self) -> Option<&'a StmtRaise>

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

Source

pub const fn is_stmt_try(&self) -> bool

Returns true if self is of variant StmtTry.

Source

pub fn as_stmt_try(&self) -> Option<&&'a StmtTry>

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

Source

pub fn as_mut_stmt_try(&mut self) -> Option<&mut &'a StmtTry>

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

Source

pub fn expect_stmt_try(self) -> &'a StmtTry
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtTry.

§Panics

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

Source

pub fn stmt_try(self) -> Option<&'a StmtTry>

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

Source

pub const fn is_stmt_assert(&self) -> bool

Returns true if self is of variant StmtAssert.

Source

pub fn as_stmt_assert(&self) -> Option<&&'a StmtAssert>

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

Source

pub fn as_mut_stmt_assert(&mut self) -> Option<&mut &'a StmtAssert>

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

Source

pub fn expect_stmt_assert(self) -> &'a StmtAssert
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtAssert.

§Panics

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

Source

pub fn stmt_assert(self) -> Option<&'a StmtAssert>

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

Source

pub const fn is_stmt_import(&self) -> bool

Returns true if self is of variant StmtImport.

Source

pub fn as_stmt_import(&self) -> Option<&&'a StmtImport>

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

Source

pub fn as_mut_stmt_import(&mut self) -> Option<&mut &'a StmtImport>

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

Source

pub fn expect_stmt_import(self) -> &'a StmtImport
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtImport.

§Panics

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

Source

pub fn stmt_import(self) -> Option<&'a StmtImport>

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

Source

pub const fn is_stmt_import_from(&self) -> bool

Returns true if self is of variant StmtImportFrom.

Source

pub fn as_stmt_import_from(&self) -> Option<&&'a StmtImportFrom>

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

Source

pub fn as_mut_stmt_import_from(&mut self) -> Option<&mut &'a StmtImportFrom>

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

Source

pub fn expect_stmt_import_from(self) -> &'a StmtImportFrom
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtImportFrom.

§Panics

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

Source

pub fn stmt_import_from(self) -> Option<&'a StmtImportFrom>

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

Source

pub const fn is_stmt_global(&self) -> bool

Returns true if self is of variant StmtGlobal.

Source

pub fn as_stmt_global(&self) -> Option<&&'a StmtGlobal>

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

Source

pub fn as_mut_stmt_global(&mut self) -> Option<&mut &'a StmtGlobal>

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

Source

pub fn expect_stmt_global(self) -> &'a StmtGlobal
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtGlobal.

§Panics

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

Source

pub fn stmt_global(self) -> Option<&'a StmtGlobal>

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

Source

pub const fn is_stmt_nonlocal(&self) -> bool

Returns true if self is of variant StmtNonlocal.

Source

pub fn as_stmt_nonlocal(&self) -> Option<&&'a StmtNonlocal>

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

Source

pub fn as_mut_stmt_nonlocal(&mut self) -> Option<&mut &'a StmtNonlocal>

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

Source

pub fn expect_stmt_nonlocal(self) -> &'a StmtNonlocal
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtNonlocal.

§Panics

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

Source

pub fn stmt_nonlocal(self) -> Option<&'a StmtNonlocal>

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

Source

pub const fn is_stmt_expr(&self) -> bool

Returns true if self is of variant StmtExpr.

Source

pub fn as_stmt_expr(&self) -> Option<&&'a StmtExpr>

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

Source

pub fn as_mut_stmt_expr(&mut self) -> Option<&mut &'a StmtExpr>

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

Source

pub fn expect_stmt_expr(self) -> &'a StmtExpr
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtExpr.

§Panics

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

Source

pub fn stmt_expr(self) -> Option<&'a StmtExpr>

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

Source

pub const fn is_stmt_pass(&self) -> bool

Returns true if self is of variant StmtPass.

Source

pub fn as_stmt_pass(&self) -> Option<&&'a StmtPass>

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

Source

pub fn as_mut_stmt_pass(&mut self) -> Option<&mut &'a StmtPass>

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

Source

pub fn expect_stmt_pass(self) -> &'a StmtPass
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtPass.

§Panics

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

Source

pub fn stmt_pass(self) -> Option<&'a StmtPass>

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

Source

pub const fn is_stmt_break(&self) -> bool

Returns true if self is of variant StmtBreak.

Source

pub fn as_stmt_break(&self) -> Option<&&'a StmtBreak>

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

Source

pub fn as_mut_stmt_break(&mut self) -> Option<&mut &'a StmtBreak>

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

Source

pub fn expect_stmt_break(self) -> &'a StmtBreak
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtBreak.

§Panics

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

Source

pub fn stmt_break(self) -> Option<&'a StmtBreak>

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

Source

pub const fn is_stmt_continue(&self) -> bool

Returns true if self is of variant StmtContinue.

Source

pub fn as_stmt_continue(&self) -> Option<&&'a StmtContinue>

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

Source

pub fn as_mut_stmt_continue(&mut self) -> Option<&mut &'a StmtContinue>

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

Source

pub fn expect_stmt_continue(self) -> &'a StmtContinue
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtContinue.

§Panics

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

Source

pub fn stmt_continue(self) -> Option<&'a StmtContinue>

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

Source

pub const fn is_stmt_ipy_escape_command(&self) -> bool

Returns true if self is of variant StmtIpyEscapeCommand.

Source

pub fn as_stmt_ipy_escape_command(&self) -> Option<&&'a StmtIpyEscapeCommand>

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

Source

pub fn as_mut_stmt_ipy_escape_command( &mut self, ) -> Option<&mut &'a StmtIpyEscapeCommand>

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

Source

pub fn expect_stmt_ipy_escape_command(self) -> &'a StmtIpyEscapeCommand
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StmtIpyEscapeCommand.

§Panics

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

Source

pub fn stmt_ipy_escape_command(self) -> Option<&'a StmtIpyEscapeCommand>

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

Source

pub const fn is_expr_bool_op(&self) -> bool

Returns true if self is of variant ExprBoolOp.

Source

pub fn as_expr_bool_op(&self) -> Option<&&'a ExprBoolOp>

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

Source

pub fn as_mut_expr_bool_op(&mut self) -> Option<&mut &'a ExprBoolOp>

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

Source

pub fn expect_expr_bool_op(self) -> &'a ExprBoolOp
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprBoolOp.

§Panics

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

Source

pub fn expr_bool_op(self) -> Option<&'a ExprBoolOp>

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

Source

pub const fn is_expr_named(&self) -> bool

Returns true if self is of variant ExprNamed.

Source

pub fn as_expr_named(&self) -> Option<&&'a ExprNamed>

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

Source

pub fn as_mut_expr_named(&mut self) -> Option<&mut &'a ExprNamed>

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

Source

pub fn expect_expr_named(self) -> &'a ExprNamed
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprNamed.

§Panics

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

Source

pub fn expr_named(self) -> Option<&'a ExprNamed>

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

Source

pub const fn is_expr_bin_op(&self) -> bool

Returns true if self is of variant ExprBinOp.

Source

pub fn as_expr_bin_op(&self) -> Option<&&'a ExprBinOp>

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

Source

pub fn as_mut_expr_bin_op(&mut self) -> Option<&mut &'a ExprBinOp>

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

Source

pub fn expect_expr_bin_op(self) -> &'a ExprBinOp
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprBinOp.

§Panics

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

Source

pub fn expr_bin_op(self) -> Option<&'a ExprBinOp>

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

Source

pub const fn is_expr_unary_op(&self) -> bool

Returns true if self is of variant ExprUnaryOp.

Source

pub fn as_expr_unary_op(&self) -> Option<&&'a ExprUnaryOp>

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

Source

pub fn as_mut_expr_unary_op(&mut self) -> Option<&mut &'a ExprUnaryOp>

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

Source

pub fn expect_expr_unary_op(self) -> &'a ExprUnaryOp
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprUnaryOp.

§Panics

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

Source

pub fn expr_unary_op(self) -> Option<&'a ExprUnaryOp>

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

Source

pub const fn is_expr_lambda(&self) -> bool

Returns true if self is of variant ExprLambda.

Source

pub fn as_expr_lambda(&self) -> Option<&&'a ExprLambda>

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

Source

pub fn as_mut_expr_lambda(&mut self) -> Option<&mut &'a ExprLambda>

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

Source

pub fn expect_expr_lambda(self) -> &'a ExprLambda
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprLambda.

§Panics

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

Source

pub fn expr_lambda(self) -> Option<&'a ExprLambda>

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

Source

pub const fn is_expr_if(&self) -> bool

Returns true if self is of variant ExprIf.

Source

pub fn as_expr_if(&self) -> Option<&&'a ExprIf>

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

Source

pub fn as_mut_expr_if(&mut self) -> Option<&mut &'a ExprIf>

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

Source

pub fn expect_expr_if(self) -> &'a ExprIf
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprIf.

§Panics

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

Source

pub fn expr_if(self) -> Option<&'a ExprIf>

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

Source

pub const fn is_expr_dict(&self) -> bool

Returns true if self is of variant ExprDict.

Source

pub fn as_expr_dict(&self) -> Option<&&'a ExprDict>

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

Source

pub fn as_mut_expr_dict(&mut self) -> Option<&mut &'a ExprDict>

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

Source

pub fn expect_expr_dict(self) -> &'a ExprDict
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprDict.

§Panics

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

Source

pub fn expr_dict(self) -> Option<&'a ExprDict>

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

Source

pub const fn is_expr_set(&self) -> bool

Returns true if self is of variant ExprSet.

Source

pub fn as_expr_set(&self) -> Option<&&'a ExprSet>

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

Source

pub fn as_mut_expr_set(&mut self) -> Option<&mut &'a ExprSet>

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

Source

pub fn expect_expr_set(self) -> &'a ExprSet
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprSet.

§Panics

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

Source

pub fn expr_set(self) -> Option<&'a ExprSet>

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

Source

pub const fn is_expr_list_comp(&self) -> bool

Returns true if self is of variant ExprListComp.

Source

pub fn as_expr_list_comp(&self) -> Option<&&'a ExprListComp>

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

Source

pub fn as_mut_expr_list_comp(&mut self) -> Option<&mut &'a ExprListComp>

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

Source

pub fn expect_expr_list_comp(self) -> &'a ExprListComp
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprListComp.

§Panics

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

Source

pub fn expr_list_comp(self) -> Option<&'a ExprListComp>

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

Source

pub const fn is_expr_set_comp(&self) -> bool

Returns true if self is of variant ExprSetComp.

Source

pub fn as_expr_set_comp(&self) -> Option<&&'a ExprSetComp>

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

Source

pub fn as_mut_expr_set_comp(&mut self) -> Option<&mut &'a ExprSetComp>

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

Source

pub fn expect_expr_set_comp(self) -> &'a ExprSetComp
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprSetComp.

§Panics

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

Source

pub fn expr_set_comp(self) -> Option<&'a ExprSetComp>

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

Source

pub const fn is_expr_dict_comp(&self) -> bool

Returns true if self is of variant ExprDictComp.

Source

pub fn as_expr_dict_comp(&self) -> Option<&&'a ExprDictComp>

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

Source

pub fn as_mut_expr_dict_comp(&mut self) -> Option<&mut &'a ExprDictComp>

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

Source

pub fn expect_expr_dict_comp(self) -> &'a ExprDictComp
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprDictComp.

§Panics

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

Source

pub fn expr_dict_comp(self) -> Option<&'a ExprDictComp>

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

Source

pub const fn is_expr_generator(&self) -> bool

Returns true if self is of variant ExprGenerator.

Source

pub fn as_expr_generator(&self) -> Option<&&'a ExprGenerator>

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

Source

pub fn as_mut_expr_generator(&mut self) -> Option<&mut &'a ExprGenerator>

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

Source

pub fn expect_expr_generator(self) -> &'a ExprGenerator
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprGenerator.

§Panics

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

Source

pub fn expr_generator(self) -> Option<&'a ExprGenerator>

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

Source

pub const fn is_expr_await(&self) -> bool

Returns true if self is of variant ExprAwait.

Source

pub fn as_expr_await(&self) -> Option<&&'a ExprAwait>

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

Source

pub fn as_mut_expr_await(&mut self) -> Option<&mut &'a ExprAwait>

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

Source

pub fn expect_expr_await(self) -> &'a ExprAwait
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprAwait.

§Panics

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

Source

pub fn expr_await(self) -> Option<&'a ExprAwait>

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

Source

pub const fn is_expr_yield(&self) -> bool

Returns true if self is of variant ExprYield.

Source

pub fn as_expr_yield(&self) -> Option<&&'a ExprYield>

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

Source

pub fn as_mut_expr_yield(&mut self) -> Option<&mut &'a ExprYield>

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

Source

pub fn expect_expr_yield(self) -> &'a ExprYield
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprYield.

§Panics

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

Source

pub fn expr_yield(self) -> Option<&'a ExprYield>

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

Source

pub const fn is_expr_yield_from(&self) -> bool

Returns true if self is of variant ExprYieldFrom.

Source

pub fn as_expr_yield_from(&self) -> Option<&&'a ExprYieldFrom>

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

Source

pub fn as_mut_expr_yield_from(&mut self) -> Option<&mut &'a ExprYieldFrom>

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

Source

pub fn expect_expr_yield_from(self) -> &'a ExprYieldFrom
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprYieldFrom.

§Panics

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

Source

pub fn expr_yield_from(self) -> Option<&'a ExprYieldFrom>

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

Source

pub const fn is_expr_compare(&self) -> bool

Returns true if self is of variant ExprCompare.

Source

pub fn as_expr_compare(&self) -> Option<&&'a ExprCompare>

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

Source

pub fn as_mut_expr_compare(&mut self) -> Option<&mut &'a ExprCompare>

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

Source

pub fn expect_expr_compare(self) -> &'a ExprCompare
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprCompare.

§Panics

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

Source

pub fn expr_compare(self) -> Option<&'a ExprCompare>

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

Source

pub const fn is_expr_call(&self) -> bool

Returns true if self is of variant ExprCall.

Source

pub fn as_expr_call(&self) -> Option<&&'a ExprCall>

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

Source

pub fn as_mut_expr_call(&mut self) -> Option<&mut &'a ExprCall>

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

Source

pub fn expect_expr_call(self) -> &'a ExprCall
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprCall.

§Panics

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

Source

pub fn expr_call(self) -> Option<&'a ExprCall>

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

Source

pub const fn is_expr_f_string(&self) -> bool

Returns true if self is of variant ExprFString.

Source

pub fn as_expr_f_string(&self) -> Option<&&'a ExprFString>

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

Source

pub fn as_mut_expr_f_string(&mut self) -> Option<&mut &'a ExprFString>

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

Source

pub fn expect_expr_f_string(self) -> &'a ExprFString
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprFString.

§Panics

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

Source

pub fn expr_f_string(self) -> Option<&'a ExprFString>

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

Source

pub const fn is_expr_t_string(&self) -> bool

Returns true if self is of variant ExprTString.

Source

pub fn as_expr_t_string(&self) -> Option<&&'a ExprTString>

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

Source

pub fn as_mut_expr_t_string(&mut self) -> Option<&mut &'a ExprTString>

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

Source

pub fn expect_expr_t_string(self) -> &'a ExprTString
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprTString.

§Panics

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

Source

pub fn expr_t_string(self) -> Option<&'a ExprTString>

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

Source

pub const fn is_expr_string_literal(&self) -> bool

Returns true if self is of variant ExprStringLiteral.

Source

pub fn as_expr_string_literal(&self) -> Option<&&'a ExprStringLiteral>

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

Source

pub fn as_mut_expr_string_literal( &mut self, ) -> Option<&mut &'a ExprStringLiteral>

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

Source

pub fn expect_expr_string_literal(self) -> &'a ExprStringLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprStringLiteral.

§Panics

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

Source

pub fn expr_string_literal(self) -> Option<&'a ExprStringLiteral>

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

Source

pub const fn is_expr_bytes_literal(&self) -> bool

Returns true if self is of variant ExprBytesLiteral.

Source

pub fn as_expr_bytes_literal(&self) -> Option<&&'a ExprBytesLiteral>

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

Source

pub fn as_mut_expr_bytes_literal(&mut self) -> Option<&mut &'a ExprBytesLiteral>

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

Source

pub fn expect_expr_bytes_literal(self) -> &'a ExprBytesLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprBytesLiteral.

§Panics

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

Source

pub fn expr_bytes_literal(self) -> Option<&'a ExprBytesLiteral>

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

Source

pub const fn is_expr_number_literal(&self) -> bool

Returns true if self is of variant ExprNumberLiteral.

Source

pub fn as_expr_number_literal(&self) -> Option<&&'a ExprNumberLiteral>

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

Source

pub fn as_mut_expr_number_literal( &mut self, ) -> Option<&mut &'a ExprNumberLiteral>

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

Source

pub fn expect_expr_number_literal(self) -> &'a ExprNumberLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprNumberLiteral.

§Panics

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

Source

pub fn expr_number_literal(self) -> Option<&'a ExprNumberLiteral>

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

Source

pub const fn is_expr_boolean_literal(&self) -> bool

Returns true if self is of variant ExprBooleanLiteral.

Source

pub fn as_expr_boolean_literal(&self) -> Option<&&'a ExprBooleanLiteral>

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

Source

pub fn as_mut_expr_boolean_literal( &mut self, ) -> Option<&mut &'a ExprBooleanLiteral>

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

Source

pub fn expect_expr_boolean_literal(self) -> &'a ExprBooleanLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprBooleanLiteral.

§Panics

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

Source

pub fn expr_boolean_literal(self) -> Option<&'a ExprBooleanLiteral>

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

Source

pub const fn is_expr_none_literal(&self) -> bool

Returns true if self is of variant ExprNoneLiteral.

Source

pub fn as_expr_none_literal(&self) -> Option<&&'a ExprNoneLiteral>

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

Source

pub fn as_mut_expr_none_literal(&mut self) -> Option<&mut &'a ExprNoneLiteral>

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

Source

pub fn expect_expr_none_literal(self) -> &'a ExprNoneLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprNoneLiteral.

§Panics

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

Source

pub fn expr_none_literal(self) -> Option<&'a ExprNoneLiteral>

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

Source

pub const fn is_expr_ellipsis_literal(&self) -> bool

Returns true if self is of variant ExprEllipsisLiteral.

Source

pub fn as_expr_ellipsis_literal(&self) -> Option<&&'a ExprEllipsisLiteral>

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

Source

pub fn as_mut_expr_ellipsis_literal( &mut self, ) -> Option<&mut &'a ExprEllipsisLiteral>

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

Source

pub fn expect_expr_ellipsis_literal(self) -> &'a ExprEllipsisLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprEllipsisLiteral.

§Panics

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

Source

pub fn expr_ellipsis_literal(self) -> Option<&'a ExprEllipsisLiteral>

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

Source

pub const fn is_expr_constant(&self) -> bool

Returns true if self is of variant ExprConstant.

Source

pub fn as_expr_constant(&self) -> Option<&&'a ExprConstant>

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

Source

pub fn as_mut_expr_constant(&mut self) -> Option<&mut &'a ExprConstant>

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

Source

pub fn expect_expr_constant(self) -> &'a ExprConstant
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprConstant.

§Panics

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

Source

pub fn expr_constant(self) -> Option<&'a ExprConstant>

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

Source

pub const fn is_expr_attribute(&self) -> bool

Returns true if self is of variant ExprAttribute.

Source

pub fn as_expr_attribute(&self) -> Option<&&'a ExprAttribute>

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

Source

pub fn as_mut_expr_attribute(&mut self) -> Option<&mut &'a ExprAttribute>

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

Source

pub fn expect_expr_attribute(self) -> &'a ExprAttribute
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprAttribute.

§Panics

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

Source

pub fn expr_attribute(self) -> Option<&'a ExprAttribute>

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

Source

pub const fn is_expr_subscript(&self) -> bool

Returns true if self is of variant ExprSubscript.

Source

pub fn as_expr_subscript(&self) -> Option<&&'a ExprSubscript>

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

Source

pub fn as_mut_expr_subscript(&mut self) -> Option<&mut &'a ExprSubscript>

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

Source

pub fn expect_expr_subscript(self) -> &'a ExprSubscript
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprSubscript.

§Panics

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

Source

pub fn expr_subscript(self) -> Option<&'a ExprSubscript>

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

Source

pub const fn is_expr_starred(&self) -> bool

Returns true if self is of variant ExprStarred.

Source

pub fn as_expr_starred(&self) -> Option<&&'a ExprStarred>

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

Source

pub fn as_mut_expr_starred(&mut self) -> Option<&mut &'a ExprStarred>

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

Source

pub fn expect_expr_starred(self) -> &'a ExprStarred
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprStarred.

§Panics

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

Source

pub fn expr_starred(self) -> Option<&'a ExprStarred>

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

Source

pub const fn is_expr_name(&self) -> bool

Returns true if self is of variant ExprName.

Source

pub fn as_expr_name(&self) -> Option<&&'a ExprName>

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

Source

pub fn as_mut_expr_name(&mut self) -> Option<&mut &'a ExprName>

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

Source

pub fn expect_expr_name(self) -> &'a ExprName
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprName.

§Panics

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

Source

pub fn expr_name(self) -> Option<&'a ExprName>

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

Source

pub const fn is_expr_list(&self) -> bool

Returns true if self is of variant ExprList.

Source

pub fn as_expr_list(&self) -> Option<&&'a ExprList>

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

Source

pub fn as_mut_expr_list(&mut self) -> Option<&mut &'a ExprList>

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

Source

pub fn expect_expr_list(self) -> &'a ExprList
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprList.

§Panics

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

Source

pub fn expr_list(self) -> Option<&'a ExprList>

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

Source

pub const fn is_expr_tuple(&self) -> bool

Returns true if self is of variant ExprTuple.

Source

pub fn as_expr_tuple(&self) -> Option<&&'a ExprTuple>

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

Source

pub fn as_mut_expr_tuple(&mut self) -> Option<&mut &'a ExprTuple>

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

Source

pub fn expect_expr_tuple(self) -> &'a ExprTuple
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprTuple.

§Panics

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

Source

pub fn expr_tuple(self) -> Option<&'a ExprTuple>

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

Source

pub const fn is_expr_slice(&self) -> bool

Returns true if self is of variant ExprSlice.

Source

pub fn as_expr_slice(&self) -> Option<&&'a ExprSlice>

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

Source

pub fn as_mut_expr_slice(&mut self) -> Option<&mut &'a ExprSlice>

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

Source

pub fn expect_expr_slice(self) -> &'a ExprSlice
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprSlice.

§Panics

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

Source

pub fn expr_slice(self) -> Option<&'a ExprSlice>

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

Source

pub const fn is_expr_ipy_escape_command(&self) -> bool

Returns true if self is of variant ExprIpyEscapeCommand.

Source

pub fn as_expr_ipy_escape_command(&self) -> Option<&&'a ExprIpyEscapeCommand>

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

Source

pub fn as_mut_expr_ipy_escape_command( &mut self, ) -> Option<&mut &'a ExprIpyEscapeCommand>

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

Source

pub fn expect_expr_ipy_escape_command(self) -> &'a ExprIpyEscapeCommand
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExprIpyEscapeCommand.

§Panics

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

Source

pub fn expr_ipy_escape_command(self) -> Option<&'a ExprIpyEscapeCommand>

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

Source

pub const fn is_except_handler_except_handler(&self) -> bool

Returns true if self is of variant ExceptHandlerExceptHandler.

Source

pub fn as_except_handler_except_handler( &self, ) -> Option<&&'a ExceptHandlerExceptHandler>

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

Source

pub fn as_mut_except_handler_except_handler( &mut self, ) -> Option<&mut &'a ExceptHandlerExceptHandler>

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

Source

pub fn expect_except_handler_except_handler( self, ) -> &'a ExceptHandlerExceptHandler
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ExceptHandlerExceptHandler.

§Panics

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

Source

pub fn except_handler_except_handler( self, ) -> Option<&'a ExceptHandlerExceptHandler>

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

Source

pub const fn is_interpolated_element(&self) -> bool

Returns true if self is of variant InterpolatedElement.

Source

pub fn as_interpolated_element(&self) -> Option<&&'a InterpolatedElement>

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

Source

pub fn as_mut_interpolated_element( &mut self, ) -> Option<&mut &'a InterpolatedElement>

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

Source

pub fn expect_interpolated_element(self) -> &'a InterpolatedElement
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of InterpolatedElement.

§Panics

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

Source

pub fn interpolated_element(self) -> Option<&'a InterpolatedElement>

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

Source

pub const fn is_interpolated_string_literal_element(&self) -> bool

Returns true if self is of variant InterpolatedStringLiteralElement.

Source

pub fn as_interpolated_string_literal_element( &self, ) -> Option<&&'a InterpolatedStringLiteralElement>

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

Source

pub fn as_mut_interpolated_string_literal_element( &mut self, ) -> Option<&mut &'a InterpolatedStringLiteralElement>

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

Source

pub fn expect_interpolated_string_literal_element( self, ) -> &'a InterpolatedStringLiteralElement
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of InterpolatedStringLiteralElement.

§Panics

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

Source

pub fn interpolated_string_literal_element( self, ) -> Option<&'a InterpolatedStringLiteralElement>

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

Source

pub const fn is_pattern_match_value(&self) -> bool

Returns true if self is of variant PatternMatchValue.

Source

pub fn as_pattern_match_value(&self) -> Option<&&'a PatternMatchValue>

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

Source

pub fn as_mut_pattern_match_value( &mut self, ) -> Option<&mut &'a PatternMatchValue>

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

Source

pub fn expect_pattern_match_value(self) -> &'a PatternMatchValue
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchValue.

§Panics

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

Source

pub fn pattern_match_value(self) -> Option<&'a PatternMatchValue>

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

Source

pub const fn is_pattern_match_singleton(&self) -> bool

Returns true if self is of variant PatternMatchSingleton.

Source

pub fn as_pattern_match_singleton(&self) -> Option<&&'a PatternMatchSingleton>

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

Source

pub fn as_mut_pattern_match_singleton( &mut self, ) -> Option<&mut &'a PatternMatchSingleton>

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

Source

pub fn expect_pattern_match_singleton(self) -> &'a PatternMatchSingleton
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchSingleton.

§Panics

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

Source

pub fn pattern_match_singleton(self) -> Option<&'a PatternMatchSingleton>

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

Source

pub const fn is_pattern_match_sequence(&self) -> bool

Returns true if self is of variant PatternMatchSequence.

Source

pub fn as_pattern_match_sequence(&self) -> Option<&&'a PatternMatchSequence>

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

Source

pub fn as_mut_pattern_match_sequence( &mut self, ) -> Option<&mut &'a PatternMatchSequence>

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

Source

pub fn expect_pattern_match_sequence(self) -> &'a PatternMatchSequence
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchSequence.

§Panics

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

Source

pub fn pattern_match_sequence(self) -> Option<&'a PatternMatchSequence>

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

Source

pub const fn is_pattern_match_mapping(&self) -> bool

Returns true if self is of variant PatternMatchMapping.

Source

pub fn as_pattern_match_mapping(&self) -> Option<&&'a PatternMatchMapping>

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

Source

pub fn as_mut_pattern_match_mapping( &mut self, ) -> Option<&mut &'a PatternMatchMapping>

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

Source

pub fn expect_pattern_match_mapping(self) -> &'a PatternMatchMapping
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchMapping.

§Panics

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

Source

pub fn pattern_match_mapping(self) -> Option<&'a PatternMatchMapping>

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

Source

pub const fn is_pattern_match_class(&self) -> bool

Returns true if self is of variant PatternMatchClass.

Source

pub fn as_pattern_match_class(&self) -> Option<&&'a PatternMatchClass>

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

Source

pub fn as_mut_pattern_match_class( &mut self, ) -> Option<&mut &'a PatternMatchClass>

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

Source

pub fn expect_pattern_match_class(self) -> &'a PatternMatchClass
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchClass.

§Panics

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

Source

pub fn pattern_match_class(self) -> Option<&'a PatternMatchClass>

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

Source

pub const fn is_pattern_match_star(&self) -> bool

Returns true if self is of variant PatternMatchStar.

Source

pub fn as_pattern_match_star(&self) -> Option<&&'a PatternMatchStar>

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

Source

pub fn as_mut_pattern_match_star(&mut self) -> Option<&mut &'a PatternMatchStar>

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

Source

pub fn expect_pattern_match_star(self) -> &'a PatternMatchStar
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchStar.

§Panics

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

Source

pub fn pattern_match_star(self) -> Option<&'a PatternMatchStar>

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

Source

pub const fn is_pattern_match_as(&self) -> bool

Returns true if self is of variant PatternMatchAs.

Source

pub fn as_pattern_match_as(&self) -> Option<&&'a PatternMatchAs>

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

Source

pub fn as_mut_pattern_match_as(&mut self) -> Option<&mut &'a PatternMatchAs>

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

Source

pub fn expect_pattern_match_as(self) -> &'a PatternMatchAs
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchAs.

§Panics

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

Source

pub fn pattern_match_as(self) -> Option<&'a PatternMatchAs>

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

Source

pub const fn is_pattern_match_or(&self) -> bool

Returns true if self is of variant PatternMatchOr.

Source

pub fn as_pattern_match_or(&self) -> Option<&&'a PatternMatchOr>

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

Source

pub fn as_mut_pattern_match_or(&mut self) -> Option<&mut &'a PatternMatchOr>

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

Source

pub fn expect_pattern_match_or(self) -> &'a PatternMatchOr
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternMatchOr.

§Panics

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

Source

pub fn pattern_match_or(self) -> Option<&'a PatternMatchOr>

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

Source

pub const fn is_type_param_type_var(&self) -> bool

Returns true if self is of variant TypeParamTypeVar.

Source

pub fn as_type_param_type_var(&self) -> Option<&&'a TypeParamTypeVar>

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

Source

pub fn as_mut_type_param_type_var( &mut self, ) -> Option<&mut &'a TypeParamTypeVar>

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

Source

pub fn expect_type_param_type_var(self) -> &'a TypeParamTypeVar
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of TypeParamTypeVar.

§Panics

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

Source

pub fn type_param_type_var(self) -> Option<&'a TypeParamTypeVar>

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

Source

pub const fn is_type_param_type_var_tuple(&self) -> bool

Returns true if self is of variant TypeParamTypeVarTuple.

Source

pub fn as_type_param_type_var_tuple(&self) -> Option<&&'a TypeParamTypeVarTuple>

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

Source

pub fn as_mut_type_param_type_var_tuple( &mut self, ) -> Option<&mut &'a TypeParamTypeVarTuple>

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

Source

pub fn expect_type_param_type_var_tuple(self) -> &'a TypeParamTypeVarTuple
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of TypeParamTypeVarTuple.

§Panics

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

Source

pub fn type_param_type_var_tuple(self) -> Option<&'a TypeParamTypeVarTuple>

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

Source

pub const fn is_type_param_param_spec(&self) -> bool

Returns true if self is of variant TypeParamParamSpec.

Source

pub fn as_type_param_param_spec(&self) -> Option<&&'a TypeParamParamSpec>

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

Source

pub fn as_mut_type_param_param_spec( &mut self, ) -> Option<&mut &'a TypeParamParamSpec>

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

Source

pub fn expect_type_param_param_spec(self) -> &'a TypeParamParamSpec
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of TypeParamParamSpec.

§Panics

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

Source

pub fn type_param_param_spec(self) -> Option<&'a TypeParamParamSpec>

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

Source

pub const fn is_interpolated_string_format_spec(&self) -> bool

Returns true if self is of variant InterpolatedStringFormatSpec.

Source

pub fn as_interpolated_string_format_spec( &self, ) -> Option<&&'a InterpolatedStringFormatSpec>

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

Source

pub fn as_mut_interpolated_string_format_spec( &mut self, ) -> Option<&mut &'a InterpolatedStringFormatSpec>

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

Source

pub fn expect_interpolated_string_format_spec( self, ) -> &'a InterpolatedStringFormatSpec
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of InterpolatedStringFormatSpec.

§Panics

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

Source

pub fn interpolated_string_format_spec( self, ) -> Option<&'a InterpolatedStringFormatSpec>

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

Source

pub const fn is_pattern_arguments(&self) -> bool

Returns true if self is of variant PatternArguments.

Source

pub fn as_pattern_arguments(&self) -> Option<&&'a PatternArguments>

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

Source

pub fn as_mut_pattern_arguments(&mut self) -> Option<&mut &'a PatternArguments>

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

Source

pub fn expect_pattern_arguments(self) -> &'a PatternArguments
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternArguments.

§Panics

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

Source

pub fn pattern_arguments(self) -> Option<&'a PatternArguments>

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

Source

pub const fn is_pattern_keyword(&self) -> bool

Returns true if self is of variant PatternKeyword.

Source

pub fn as_pattern_keyword(&self) -> Option<&&'a PatternKeyword>

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

Source

pub fn as_mut_pattern_keyword(&mut self) -> Option<&mut &'a PatternKeyword>

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

Source

pub fn expect_pattern_keyword(self) -> &'a PatternKeyword
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of PatternKeyword.

§Panics

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

Source

pub fn pattern_keyword(self) -> Option<&'a PatternKeyword>

Returns Some if self is of variant PatternKeyword, 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<&&'a Comprehension>

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

Source

pub fn as_mut_comprehension(&mut self) -> Option<&mut &'a Comprehension>

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

Source

pub fn expect_comprehension(self) -> &'a Comprehension
where AnyNodeRef<'a>: 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<&'a Comprehension>

Returns Some if self is of variant Comprehension, 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<&&'a Arguments>

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

Source

pub fn as_mut_arguments(&mut self) -> Option<&mut &'a Arguments>

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

Source

pub fn expect_arguments(self) -> &'a Arguments
where AnyNodeRef<'a>: 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<&'a Arguments>

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

Source

pub const fn is_parameters(&self) -> bool

Returns true if self is of variant Parameters.

Source

pub fn as_parameters(&self) -> Option<&&'a Parameters>

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

Source

pub fn as_mut_parameters(&mut self) -> Option<&mut &'a Parameters>

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

Source

pub fn expect_parameters(self) -> &'a Parameters
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of Parameters.

§Panics

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

Source

pub fn parameters(self) -> Option<&'a Parameters>

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

Source

pub const fn is_parameter(&self) -> bool

Returns true if self is of variant Parameter.

Source

pub fn as_parameter(&self) -> Option<&&'a Parameter>

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

Source

pub fn as_mut_parameter(&mut self) -> Option<&mut &'a Parameter>

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

Source

pub fn expect_parameter(self) -> &'a Parameter
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of Parameter.

§Panics

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

Source

pub fn parameter(self) -> Option<&'a Parameter>

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

Source

pub const fn is_parameter_with_default(&self) -> bool

Returns true if self is of variant ParameterWithDefault.

Source

pub fn as_parameter_with_default(&self) -> Option<&&'a ParameterWithDefault>

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

Source

pub fn as_mut_parameter_with_default( &mut self, ) -> Option<&mut &'a ParameterWithDefault>

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

Source

pub fn expect_parameter_with_default(self) -> &'a ParameterWithDefault
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ParameterWithDefault.

§Panics

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

Source

pub fn parameter_with_default(self) -> Option<&'a ParameterWithDefault>

Returns Some if self is of variant ParameterWithDefault, 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<&&'a Keyword>

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

Source

pub fn as_mut_keyword(&mut self) -> Option<&mut &'a Keyword>

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

Source

pub fn expect_keyword(self) -> &'a Keyword
where AnyNodeRef<'a>: 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<&'a Keyword>

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<&&'a Alias>

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

Source

pub fn as_mut_alias(&mut self) -> Option<&mut &'a Alias>

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

Source

pub fn expect_alias(self) -> &'a Alias
where AnyNodeRef<'a>: 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<&'a Alias>

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<&&'a WithItem>

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

Source

pub fn as_mut_with_item(&mut self) -> Option<&mut &'a WithItem>

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

Source

pub fn expect_with_item(self) -> &'a WithItem
where AnyNodeRef<'a>: 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<&'a WithItem>

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<&&'a MatchCase>

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

Source

pub fn as_mut_match_case(&mut self) -> Option<&mut &'a MatchCase>

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

Source

pub fn expect_match_case(self) -> &'a MatchCase
where AnyNodeRef<'a>: 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<&'a MatchCase>

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

Source

pub const fn is_decorator(&self) -> bool

Returns true if self is of variant Decorator.

Source

pub fn as_decorator(&self) -> Option<&&'a Decorator>

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

Source

pub fn as_mut_decorator(&mut self) -> Option<&mut &'a Decorator>

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

Source

pub fn expect_decorator(self) -> &'a Decorator
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of Decorator.

§Panics

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

Source

pub fn decorator(self) -> Option<&'a Decorator>

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

Source

pub const fn is_elif_else_clause(&self) -> bool

Returns true if self is of variant ElifElseClause.

Source

pub fn as_elif_else_clause(&self) -> Option<&&'a ElifElseClause>

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

Source

pub fn as_mut_elif_else_clause(&mut self) -> Option<&mut &'a ElifElseClause>

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

Source

pub fn expect_elif_else_clause(self) -> &'a ElifElseClause
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of ElifElseClause.

§Panics

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

Source

pub fn elif_else_clause(self) -> Option<&'a ElifElseClause>

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

Source

pub const fn is_type_params(&self) -> bool

Returns true if self is of variant TypeParams.

Source

pub fn as_type_params(&self) -> Option<&&'a TypeParams>

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

Source

pub fn as_mut_type_params(&mut self) -> Option<&mut &'a TypeParams>

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

Source

pub fn expect_type_params(self) -> &'a TypeParams
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of TypeParams.

§Panics

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

Source

pub fn type_params(self) -> Option<&'a TypeParams>

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

Source

pub const fn is_f_string(&self) -> bool

Returns true if self is of variant FString.

Source

pub fn as_f_string(&self) -> Option<&&'a FString>

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

Source

pub fn as_mut_f_string(&mut self) -> Option<&mut &'a FString>

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

Source

pub fn expect_f_string(self) -> &'a FString
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of FString.

§Panics

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

Source

pub fn f_string(self) -> Option<&'a FString>

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

Source

pub const fn is_t_string(&self) -> bool

Returns true if self is of variant TString.

Source

pub fn as_t_string(&self) -> Option<&&'a TString>

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

Source

pub fn as_mut_t_string(&mut self) -> Option<&mut &'a TString>

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

Source

pub fn expect_t_string(self) -> &'a TString
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of TString.

§Panics

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

Source

pub fn t_string(self) -> Option<&'a TString>

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

Source

pub const fn is_string_literal(&self) -> bool

Returns true if self is of variant StringLiteral.

Source

pub fn as_string_literal(&self) -> Option<&&'a StringLiteral>

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

Source

pub fn as_mut_string_literal(&mut self) -> Option<&mut &'a StringLiteral>

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

Source

pub fn expect_string_literal(self) -> &'a StringLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of StringLiteral.

§Panics

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

Source

pub fn string_literal(self) -> Option<&'a StringLiteral>

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

Source

pub const fn is_bytes_literal(&self) -> bool

Returns true if self is of variant BytesLiteral.

Source

pub fn as_bytes_literal(&self) -> Option<&&'a BytesLiteral>

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

Source

pub fn as_mut_bytes_literal(&mut self) -> Option<&mut &'a BytesLiteral>

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

Source

pub fn expect_bytes_literal(self) -> &'a BytesLiteral
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of BytesLiteral.

§Panics

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

Source

pub fn bytes_literal(self) -> Option<&'a BytesLiteral>

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

Source

pub const fn is_identifier(&self) -> bool

Returns true if self is of variant Identifier.

Source

pub fn as_identifier(&self) -> Option<&&'a Identifier>

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

Source

pub fn as_mut_identifier(&mut self) -> Option<&mut &'a Identifier>

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

Source

pub fn expect_identifier(self) -> &'a Identifier
where AnyNodeRef<'a>: Debug,

Unwraps the value, yielding the content of Identifier.

§Panics

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

Source

pub fn identifier(self) -> Option<&'a Identifier>

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

Source§

impl<'a> AnyNodeRef<'a>

Source

pub fn as_mod_ref(self) -> Option<ModRef<'a>>

Source§

impl<'a> AnyNodeRef<'a>

Source

pub fn as_stmt_ref(self) -> Option<StmtRef<'a>>

Source§

impl<'a> AnyNodeRef<'a>

Source

pub fn as_expr_ref(self) -> Option<ExprRef<'a>>

Source§

impl<'a> AnyNodeRef<'a>

Source§

impl<'a> AnyNodeRef<'a>

Source§

impl<'a> AnyNodeRef<'a>

Source§

impl<'a> AnyNodeRef<'a>

Source§

impl AnyNodeRef<'_>

Source

pub fn as_ptr(&self) -> NonNull<()>

Source§

impl<'a> AnyNodeRef<'a>

Source

pub fn visit_source_order<'b, V>(self, visitor: &mut V)
where 'a: 'b, V: SourceOrderVisitor<'b> + ?Sized,

Source§

impl AnyNodeRef<'_>

Source

pub const fn is_module(self) -> bool

Source§

impl AnyNodeRef<'_>

Source

pub const fn is_statement(self) -> bool

Source§

impl AnyNodeRef<'_>

Source

pub const fn is_expression(self) -> bool

Source§

impl AnyNodeRef<'_>

Source

pub const fn is_except_handler(self) -> bool

Source§

impl AnyNodeRef<'_>

Source§

impl AnyNodeRef<'_>

Source

pub const fn is_pattern(self) -> bool

Source§

impl AnyNodeRef<'_>

Source

pub const fn is_type_param(self) -> bool

Source§

impl AnyNodeRef<'_>

Source

pub const fn kind(self) -> NodeKind

Source§

impl<'a> AnyNodeRef<'a>

Source

pub fn ptr_eq(self, other: AnyNodeRef<'_>) -> bool

Compares two any node refs by their pointers (referential equality).

Source

pub const fn is_alternative_branch_with_node(self) -> bool

In our AST, only some alternative branches are represented as a node. This has historical reasons, e.g. we added a node for elif/else in if statements which was not originally present in the parser.

Source

pub fn last_child_in_body(&self) -> Option<AnyNodeRef<'a>>

The last child of the last branch, if the node has multiple branches.

Source

pub fn is_first_statement_in_body(&self, body: AnyNodeRef<'_>) -> bool

Check if the given statement is the first statement after the colon of a branch, be it in if statements, for statements, after each part of a try-except-else-finally or function/class definitions.

if True:    <- has body
    a       <- first statement
    b
elif b:     <- has body
    c       <- first statement
    d
else:       <- has body
    e       <- first statement
    f

class:      <- has body
    a: int  <- first statement
    b: int

For nodes with multiple bodies, we check all bodies that don’t have their own node. For try-except-else-finally, each except branch has it’s own node, so for the StmtTry, we check the try:, else: and finally:, bodies, while ExceptHandlerExceptHandler has it’s own check. For for-else and while-else, we check both branches for the whole statement.

try:        <- has body (a)
    6/8     <- first statement (a)
    1/0
except:     <- has body (b)
    a       <- first statement (b)
    b
else:
    c       <- first statement (a)
    d
finally:
    e       <- first statement (a)
    f
Source

pub fn is_first_statement_in_alternate_body(&self, body: AnyNodeRef<'_>) -> bool

Returns true if statement is the first statement in an alternate body (e.g. the else of an if statement)

Trait Implementations§

Source§

impl<'a> Clone for AnyNodeRef<'a>

Source§

fn clone(&self) -> AnyNodeRef<'a>

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<'a> Copy for AnyNodeRef<'a>

Source§

impl<'a> Debug for AnyNodeRef<'a>

Source§

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

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

impl<'a> From<&'a Alias> for AnyNodeRef<'a>

Source§

fn from(node: &'a Alias) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Arguments> for AnyNodeRef<'a>

Source§

fn from(node: &'a Arguments) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a BytesLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a BytesLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Comprehension> for AnyNodeRef<'a>

Source§

fn from(node: &'a Comprehension) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Decorator> for AnyNodeRef<'a>

Source§

fn from(node: &'a Decorator) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ElifElseClause> for AnyNodeRef<'a>

Source§

fn from(node: &'a ElifElseClause) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExceptHandler> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExceptHandler) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExceptHandlerExceptHandler> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExceptHandlerExceptHandler) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Expr> for AnyNodeRef<'a>

Source§

fn from(node: &'a Expr) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprAttribute> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprAttribute) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprAwait> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprAwait) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprBinOp> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprBinOp) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprBoolOp> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprBoolOp) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprBooleanLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprBooleanLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprBytesLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprBytesLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprCall> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprCall) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprCompare> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprCompare) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprConstant> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprConstant) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprDict> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprDict) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprDictComp> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprDictComp) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprEllipsisLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprEllipsisLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprFString> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprFString) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprGenerator> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprGenerator) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprIf> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprIf) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprIpyEscapeCommand> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprIpyEscapeCommand) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprLambda> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprLambda) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprList> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprList) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprListComp> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprListComp) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprName> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprName) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprNamed> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprNamed) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprNoneLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprNoneLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprNumberLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprNumberLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprSet> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprSet) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprSetComp> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprSetComp) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprSlice> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprSlice) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprStarred> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprStarred) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprStringLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprStringLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprSubscript> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprSubscript) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprTString> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprTString) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprTuple> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprTuple) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprUnaryOp> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprUnaryOp) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprYield> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprYield) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ExprYieldFrom> for AnyNodeRef<'a>

Source§

fn from(node: &'a ExprYieldFrom) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a FString> for AnyNodeRef<'a>

Source§

fn from(node: &'a FString) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Identifier> for AnyNodeRef<'a>

Source§

fn from(node: &'a Identifier) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a InterpolatedElement> for AnyNodeRef<'a>

Source§

fn from(node: &'a InterpolatedElement) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a InterpolatedStringElement> for AnyNodeRef<'a>

Source§

fn from(node: &'a InterpolatedStringElement) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a InterpolatedStringFormatSpec> for AnyNodeRef<'a>

Source§

fn from(node: &'a InterpolatedStringFormatSpec) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a InterpolatedStringLiteralElement> for AnyNodeRef<'a>

Source§

fn from(node: &'a InterpolatedStringLiteralElement) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Keyword> for AnyNodeRef<'a>

Source§

fn from(node: &'a Keyword) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a MatchCase> for AnyNodeRef<'a>

Source§

fn from(node: &'a MatchCase) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Mod> for AnyNodeRef<'a>

Source§

fn from(node: &'a Mod) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ModExpression> for AnyNodeRef<'a>

Source§

fn from(node: &'a ModExpression) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ModModule> for AnyNodeRef<'a>

Source§

fn from(node: &'a ModModule) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Parameter> for AnyNodeRef<'a>

Source§

fn from(node: &'a Parameter) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a ParameterWithDefault> for AnyNodeRef<'a>

Source§

fn from(node: &'a ParameterWithDefault) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Parameters> for AnyNodeRef<'a>

Source§

fn from(node: &'a Parameters) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Pattern> for AnyNodeRef<'a>

Source§

fn from(node: &'a Pattern) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternArguments> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternArguments) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternKeyword> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternKeyword) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchAs> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchAs) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchClass> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchClass) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchMapping> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchMapping) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchOr> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchOr) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchSequence> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchSequence) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchSingleton> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchSingleton) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchStar> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchStar) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a PatternMatchValue> for AnyNodeRef<'a>

Source§

fn from(node: &'a PatternMatchValue) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a Stmt> for AnyNodeRef<'a>

Source§

fn from(node: &'a Stmt) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAnnAssign> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtAnnAssign) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAssert> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtAssert) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAssign> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtAssign) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAugAssign> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtAugAssign) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtBreak> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtBreak) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtClassDef> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtClassDef) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtContinue> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtContinue) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtDelete> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtDelete) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtExpr> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtExpr) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtFor> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtFor) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtFunctionDef> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtFunctionDef) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtGlobal> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtGlobal) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtIf> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtIf) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtImport> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtImport) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtImportFrom> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtImportFrom) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtIpyEscapeCommand> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtIpyEscapeCommand) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtMatch> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtMatch) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtNonlocal> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtNonlocal) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtPass> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtPass) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtRaise> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtRaise) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtReturn> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtReturn) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtTry> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtTry) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtTypeAlias> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtTypeAlias) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtWhile> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtWhile) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtWith> for AnyNodeRef<'a>

Source§

fn from(node: &'a StmtWith) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StringLiteral> for AnyNodeRef<'a>

Source§

fn from(node: &'a StringLiteral) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a TString> for AnyNodeRef<'a>

Source§

fn from(node: &'a TString) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a TypeParam> for AnyNodeRef<'a>

Source§

fn from(node: &'a TypeParam) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a TypeParamParamSpec> for AnyNodeRef<'a>

Source§

fn from(node: &'a TypeParamParamSpec) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a TypeParamTypeVar> for AnyNodeRef<'a>

Source§

fn from(node: &'a TypeParamTypeVar) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a TypeParamTypeVarTuple> for AnyNodeRef<'a>

Source§

fn from(node: &'a TypeParamTypeVarTuple) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a TypeParams> for AnyNodeRef<'a>

Source§

fn from(node: &'a TypeParams) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a WithItem> for AnyNodeRef<'a>

Source§

fn from(node: &'a WithItem) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&StringLike<'a>> for AnyNodeRef<'a>

Source§

fn from(value: &StringLike<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&StringLikePart<'a>> for AnyNodeRef<'a>

Source§

fn from(value: &StringLikePart<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<ExceptHandlerRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: ExceptHandlerRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<ExprRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: ExprRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<InterpolatedStringElementRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: InterpolatedStringElementRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<LiteralExpressionRef<'a>> for AnyNodeRef<'a>

Source§

fn from(value: LiteralExpressionRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<ModRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: ModRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<PatternRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: PatternRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<StmtRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: StmtRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<StringLike<'a>> for AnyNodeRef<'a>

Source§

fn from(value: StringLike<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<StringLikePart<'a>> for AnyNodeRef<'a>

Source§

fn from(value: StringLikePart<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<TypeParamRef<'a>> for AnyNodeRef<'a>

Source§

fn from(node: TypeParamRef<'a>) -> AnyNodeRef<'a>

Converts to this type from the input type.
Source§

impl<'a> GetSize for AnyNodeRef<'a>

Source§

fn get_heap_size(&self) -> usize

Determines how many bytes this object occupies inside the heap. Read more
Source§

fn get_heap_size_with_tracker<TRACKER>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
where TRACKER: GetSizeTracker,

Determines how many bytes this object occupies inside the heap while using a tracker. Read more
Source§

fn get_stack_size() -> usize

Determines how may bytes this object occupies inside the stack. Read more
Source§

fn get_size(&self) -> usize

Determines the total size of the object. Read more
Source§

fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)
where T: GetSizeTracker,

Determines the total size of the object while using a tracker. Read more
Source§

impl HasNodeIndex for AnyNodeRef<'_>

Source§

fn node_index(&self) -> &AtomicNodeIndex

Returns the AtomicNodeIndex for this node.
Source§

impl<'a> PartialEq for AnyNodeRef<'a>

Source§

fn eq(&self, other: &AnyNodeRef<'a>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl Ranged for AnyNodeRef<'_>

Source§

fn range(&self) -> TextRange

The range of this item in the source text.
Source§

fn start(&self) -> TextSize

The start offset of this item in the source text.
Source§

fn end(&self) -> TextSize

The end offset of this item in the source text.
Source§

impl<'a> StructuralPartialEq for AnyNodeRef<'a>

Source§

impl<'a> TryFrom<AnyNodeRef<'a>> for StringLike<'a>

Source§

type Error = ()

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

fn try_from( value: AnyNodeRef<'a>, ) -> Result<StringLike<'a>, <StringLike<'a> as TryFrom<AnyNodeRef<'a>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a> Freeze for AnyNodeRef<'a>

§

impl<'a> RefUnwindSafe for AnyNodeRef<'a>

§

impl<'a> Send for AnyNodeRef<'a>

§

impl<'a> Sync for AnyNodeRef<'a>

§

impl<'a> Unpin for AnyNodeRef<'a>

§

impl<'a> UnsafeUnpin for AnyNodeRef<'a>

§

impl<'a> UnwindSafe for AnyNodeRef<'a>

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> ErasedDestructor for T
where T: 'static,

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> Helper for T

Source§

impl<T, U> ImaginaryInto<U> for T
where U: ImaginaryFrom<T>,

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> PrimitiveIntRandomBounds for T

Source§

impl<T> PrimitiveSignedRandomBounds for T

Source§

impl<T> PyThreadingConstraint for 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