pub enum AnyNodeRef<'a> {
Show 94 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),
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)
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>
impl<'a> AnyNodeRef<'a>
Sourcepub const fn is_mod_module(&self) -> bool
pub const fn is_mod_module(&self) -> bool
Returns true if self is of variant ModModule.
Sourcepub fn as_mod_module(&self) -> Option<&&'a ModModule>
pub fn as_mod_module(&self) -> Option<&&'a ModModule>
Returns Some if self is a reference of variant ModModule, and None otherwise.
Sourcepub fn as_mut_mod_module(&mut self) -> Option<&mut &'a ModModule>
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.
Sourcepub fn expect_mod_module(self) -> &'a ModModulewhere
AnyNodeRef<'a>: Debug,
pub fn expect_mod_module(self) -> &'a ModModulewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn mod_module(self) -> Option<&'a ModModule>
pub fn mod_module(self) -> Option<&'a ModModule>
Returns Some if self is of variant ModModule, and None otherwise.
Sourcepub const fn is_mod_expression(&self) -> bool
pub const fn is_mod_expression(&self) -> bool
Returns true if self is of variant ModExpression.
Sourcepub fn as_mod_expression(&self) -> Option<&&'a ModExpression>
pub fn as_mod_expression(&self) -> Option<&&'a ModExpression>
Returns Some if self is a reference of variant ModExpression, and None otherwise.
Sourcepub fn as_mut_mod_expression(&mut self) -> Option<&mut &'a ModExpression>
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.
Sourcepub fn expect_mod_expression(self) -> &'a ModExpressionwhere
AnyNodeRef<'a>: Debug,
pub fn expect_mod_expression(self) -> &'a ModExpressionwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ModExpression.
§Panics
Panics if the value is not ModExpression, with a panic message including the content of self.
Sourcepub fn mod_expression(self) -> Option<&'a ModExpression>
pub fn mod_expression(self) -> Option<&'a ModExpression>
Returns Some if self is of variant ModExpression, and None otherwise.
Sourcepub const fn is_stmt_function_def(&self) -> bool
pub const fn is_stmt_function_def(&self) -> bool
Returns true if self is of variant StmtFunctionDef.
Sourcepub fn as_stmt_function_def(&self) -> Option<&&'a StmtFunctionDef>
pub fn as_stmt_function_def(&self) -> Option<&&'a StmtFunctionDef>
Returns Some if self is a reference of variant StmtFunctionDef, and None otherwise.
Sourcepub fn as_mut_stmt_function_def(&mut self) -> Option<&mut &'a StmtFunctionDef>
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.
Sourcepub fn expect_stmt_function_def(self) -> &'a StmtFunctionDefwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_function_def(self) -> &'a StmtFunctionDefwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtFunctionDef.
§Panics
Panics if the value is not StmtFunctionDef, with a panic message including the content of self.
Sourcepub fn stmt_function_def(self) -> Option<&'a StmtFunctionDef>
pub fn stmt_function_def(self) -> Option<&'a StmtFunctionDef>
Returns Some if self is of variant StmtFunctionDef, and None otherwise.
Sourcepub const fn is_stmt_class_def(&self) -> bool
pub const fn is_stmt_class_def(&self) -> bool
Returns true if self is of variant StmtClassDef.
Sourcepub fn as_stmt_class_def(&self) -> Option<&&'a StmtClassDef>
pub fn as_stmt_class_def(&self) -> Option<&&'a StmtClassDef>
Returns Some if self is a reference of variant StmtClassDef, and None otherwise.
Sourcepub fn as_mut_stmt_class_def(&mut self) -> Option<&mut &'a StmtClassDef>
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.
Sourcepub fn expect_stmt_class_def(self) -> &'a StmtClassDefwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_class_def(self) -> &'a StmtClassDefwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtClassDef.
§Panics
Panics if the value is not StmtClassDef, with a panic message including the content of self.
Sourcepub fn stmt_class_def(self) -> Option<&'a StmtClassDef>
pub fn stmt_class_def(self) -> Option<&'a StmtClassDef>
Returns Some if self is of variant StmtClassDef, and None otherwise.
Sourcepub const fn is_stmt_return(&self) -> bool
pub const fn is_stmt_return(&self) -> bool
Returns true if self is of variant StmtReturn.
Sourcepub fn as_stmt_return(&self) -> Option<&&'a StmtReturn>
pub fn as_stmt_return(&self) -> Option<&&'a StmtReturn>
Returns Some if self is a reference of variant StmtReturn, and None otherwise.
Sourcepub fn as_mut_stmt_return(&mut self) -> Option<&mut &'a StmtReturn>
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.
Sourcepub fn expect_stmt_return(self) -> &'a StmtReturnwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_return(self) -> &'a StmtReturnwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtReturn.
§Panics
Panics if the value is not StmtReturn, with a panic message including the content of self.
Sourcepub fn stmt_return(self) -> Option<&'a StmtReturn>
pub fn stmt_return(self) -> Option<&'a StmtReturn>
Returns Some if self is of variant StmtReturn, and None otherwise.
Sourcepub const fn is_stmt_delete(&self) -> bool
pub const fn is_stmt_delete(&self) -> bool
Returns true if self is of variant StmtDelete.
Sourcepub fn as_stmt_delete(&self) -> Option<&&'a StmtDelete>
pub fn as_stmt_delete(&self) -> Option<&&'a StmtDelete>
Returns Some if self is a reference of variant StmtDelete, and None otherwise.
Sourcepub fn as_mut_stmt_delete(&mut self) -> Option<&mut &'a StmtDelete>
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.
Sourcepub fn expect_stmt_delete(self) -> &'a StmtDeletewhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_delete(self) -> &'a StmtDeletewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtDelete.
§Panics
Panics if the value is not StmtDelete, with a panic message including the content of self.
Sourcepub fn stmt_delete(self) -> Option<&'a StmtDelete>
pub fn stmt_delete(self) -> Option<&'a StmtDelete>
Returns Some if self is of variant StmtDelete, and None otherwise.
Sourcepub const fn is_stmt_type_alias(&self) -> bool
pub const fn is_stmt_type_alias(&self) -> bool
Returns true if self is of variant StmtTypeAlias.
Sourcepub fn as_stmt_type_alias(&self) -> Option<&&'a StmtTypeAlias>
pub fn as_stmt_type_alias(&self) -> Option<&&'a StmtTypeAlias>
Returns Some if self is a reference of variant StmtTypeAlias, and None otherwise.
Sourcepub fn as_mut_stmt_type_alias(&mut self) -> Option<&mut &'a StmtTypeAlias>
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.
Sourcepub fn expect_stmt_type_alias(self) -> &'a StmtTypeAliaswhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_type_alias(self) -> &'a StmtTypeAliaswhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtTypeAlias.
§Panics
Panics if the value is not StmtTypeAlias, with a panic message including the content of self.
Sourcepub fn stmt_type_alias(self) -> Option<&'a StmtTypeAlias>
pub fn stmt_type_alias(self) -> Option<&'a StmtTypeAlias>
Returns Some if self is of variant StmtTypeAlias, and None otherwise.
Sourcepub const fn is_stmt_assign(&self) -> bool
pub const fn is_stmt_assign(&self) -> bool
Returns true if self is of variant StmtAssign.
Sourcepub fn as_stmt_assign(&self) -> Option<&&'a StmtAssign>
pub fn as_stmt_assign(&self) -> Option<&&'a StmtAssign>
Returns Some if self is a reference of variant StmtAssign, and None otherwise.
Sourcepub fn as_mut_stmt_assign(&mut self) -> Option<&mut &'a StmtAssign>
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.
Sourcepub fn expect_stmt_assign(self) -> &'a StmtAssignwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_assign(self) -> &'a StmtAssignwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtAssign.
§Panics
Panics if the value is not StmtAssign, with a panic message including the content of self.
Sourcepub fn stmt_assign(self) -> Option<&'a StmtAssign>
pub fn stmt_assign(self) -> Option<&'a StmtAssign>
Returns Some if self is of variant StmtAssign, and None otherwise.
Sourcepub const fn is_stmt_aug_assign(&self) -> bool
pub const fn is_stmt_aug_assign(&self) -> bool
Returns true if self is of variant StmtAugAssign.
Sourcepub fn as_stmt_aug_assign(&self) -> Option<&&'a StmtAugAssign>
pub fn as_stmt_aug_assign(&self) -> Option<&&'a StmtAugAssign>
Returns Some if self is a reference of variant StmtAugAssign, and None otherwise.
Sourcepub fn as_mut_stmt_aug_assign(&mut self) -> Option<&mut &'a StmtAugAssign>
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.
Sourcepub fn expect_stmt_aug_assign(self) -> &'a StmtAugAssignwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_aug_assign(self) -> &'a StmtAugAssignwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtAugAssign.
§Panics
Panics if the value is not StmtAugAssign, with a panic message including the content of self.
Sourcepub fn stmt_aug_assign(self) -> Option<&'a StmtAugAssign>
pub fn stmt_aug_assign(self) -> Option<&'a StmtAugAssign>
Returns Some if self is of variant StmtAugAssign, and None otherwise.
Sourcepub const fn is_stmt_ann_assign(&self) -> bool
pub const fn is_stmt_ann_assign(&self) -> bool
Returns true if self is of variant StmtAnnAssign.
Sourcepub fn as_stmt_ann_assign(&self) -> Option<&&'a StmtAnnAssign>
pub fn as_stmt_ann_assign(&self) -> Option<&&'a StmtAnnAssign>
Returns Some if self is a reference of variant StmtAnnAssign, and None otherwise.
Sourcepub fn as_mut_stmt_ann_assign(&mut self) -> Option<&mut &'a StmtAnnAssign>
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.
Sourcepub fn expect_stmt_ann_assign(self) -> &'a StmtAnnAssignwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_ann_assign(self) -> &'a StmtAnnAssignwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtAnnAssign.
§Panics
Panics if the value is not StmtAnnAssign, with a panic message including the content of self.
Sourcepub fn stmt_ann_assign(self) -> Option<&'a StmtAnnAssign>
pub fn stmt_ann_assign(self) -> Option<&'a StmtAnnAssign>
Returns Some if self is of variant StmtAnnAssign, and None otherwise.
Sourcepub const fn is_stmt_for(&self) -> bool
pub const fn is_stmt_for(&self) -> bool
Returns true if self is of variant StmtFor.
Sourcepub fn as_stmt_for(&self) -> Option<&&'a StmtFor>
pub fn as_stmt_for(&self) -> Option<&&'a StmtFor>
Returns Some if self is a reference of variant StmtFor, and None otherwise.
Sourcepub fn as_mut_stmt_for(&mut self) -> Option<&mut &'a StmtFor>
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.
Sourcepub fn expect_stmt_for(self) -> &'a StmtForwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_for(self) -> &'a StmtForwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_for(self) -> Option<&'a StmtFor>
pub fn stmt_for(self) -> Option<&'a StmtFor>
Returns Some if self is of variant StmtFor, and None otherwise.
Sourcepub const fn is_stmt_while(&self) -> bool
pub const fn is_stmt_while(&self) -> bool
Returns true if self is of variant StmtWhile.
Sourcepub fn as_stmt_while(&self) -> Option<&&'a StmtWhile>
pub fn as_stmt_while(&self) -> Option<&&'a StmtWhile>
Returns Some if self is a reference of variant StmtWhile, and None otherwise.
Sourcepub fn as_mut_stmt_while(&mut self) -> Option<&mut &'a StmtWhile>
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.
Sourcepub fn expect_stmt_while(self) -> &'a StmtWhilewhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_while(self) -> &'a StmtWhilewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_while(self) -> Option<&'a StmtWhile>
pub fn stmt_while(self) -> Option<&'a StmtWhile>
Returns Some if self is of variant StmtWhile, and None otherwise.
Sourcepub const fn is_stmt_if(&self) -> bool
pub const fn is_stmt_if(&self) -> bool
Returns true if self is of variant StmtIf.
Sourcepub fn as_stmt_if(&self) -> Option<&&'a StmtIf>
pub fn as_stmt_if(&self) -> Option<&&'a StmtIf>
Returns Some if self is a reference of variant StmtIf, and None otherwise.
Sourcepub fn as_mut_stmt_if(&mut self) -> Option<&mut &'a StmtIf>
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.
Sourcepub fn expect_stmt_if(self) -> &'a StmtIfwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_if(self) -> &'a StmtIfwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_if(self) -> Option<&'a StmtIf>
pub fn stmt_if(self) -> Option<&'a StmtIf>
Returns Some if self is of variant StmtIf, and None otherwise.
Sourcepub const fn is_stmt_with(&self) -> bool
pub const fn is_stmt_with(&self) -> bool
Returns true if self is of variant StmtWith.
Sourcepub fn as_stmt_with(&self) -> Option<&&'a StmtWith>
pub fn as_stmt_with(&self) -> Option<&&'a StmtWith>
Returns Some if self is a reference of variant StmtWith, and None otherwise.
Sourcepub fn as_mut_stmt_with(&mut self) -> Option<&mut &'a StmtWith>
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.
Sourcepub fn expect_stmt_with(self) -> &'a StmtWithwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_with(self) -> &'a StmtWithwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_with(self) -> Option<&'a StmtWith>
pub fn stmt_with(self) -> Option<&'a StmtWith>
Returns Some if self is of variant StmtWith, and None otherwise.
Sourcepub const fn is_stmt_match(&self) -> bool
pub const fn is_stmt_match(&self) -> bool
Returns true if self is of variant StmtMatch.
Sourcepub fn as_stmt_match(&self) -> Option<&&'a StmtMatch>
pub fn as_stmt_match(&self) -> Option<&&'a StmtMatch>
Returns Some if self is a reference of variant StmtMatch, and None otherwise.
Sourcepub fn as_mut_stmt_match(&mut self) -> Option<&mut &'a StmtMatch>
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.
Sourcepub fn expect_stmt_match(self) -> &'a StmtMatchwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_match(self) -> &'a StmtMatchwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_match(self) -> Option<&'a StmtMatch>
pub fn stmt_match(self) -> Option<&'a StmtMatch>
Returns Some if self is of variant StmtMatch, and None otherwise.
Sourcepub const fn is_stmt_raise(&self) -> bool
pub const fn is_stmt_raise(&self) -> bool
Returns true if self is of variant StmtRaise.
Sourcepub fn as_stmt_raise(&self) -> Option<&&'a StmtRaise>
pub fn as_stmt_raise(&self) -> Option<&&'a StmtRaise>
Returns Some if self is a reference of variant StmtRaise, and None otherwise.
Sourcepub fn as_mut_stmt_raise(&mut self) -> Option<&mut &'a StmtRaise>
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.
Sourcepub fn expect_stmt_raise(self) -> &'a StmtRaisewhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_raise(self) -> &'a StmtRaisewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_raise(self) -> Option<&'a StmtRaise>
pub fn stmt_raise(self) -> Option<&'a StmtRaise>
Returns Some if self is of variant StmtRaise, and None otherwise.
Sourcepub const fn is_stmt_try(&self) -> bool
pub const fn is_stmt_try(&self) -> bool
Returns true if self is of variant StmtTry.
Sourcepub fn as_stmt_try(&self) -> Option<&&'a StmtTry>
pub fn as_stmt_try(&self) -> Option<&&'a StmtTry>
Returns Some if self is a reference of variant StmtTry, and None otherwise.
Sourcepub fn as_mut_stmt_try(&mut self) -> Option<&mut &'a StmtTry>
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.
Sourcepub fn expect_stmt_try(self) -> &'a StmtTrywhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_try(self) -> &'a StmtTrywhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_try(self) -> Option<&'a StmtTry>
pub fn stmt_try(self) -> Option<&'a StmtTry>
Returns Some if self is of variant StmtTry, and None otherwise.
Sourcepub const fn is_stmt_assert(&self) -> bool
pub const fn is_stmt_assert(&self) -> bool
Returns true if self is of variant StmtAssert.
Sourcepub fn as_stmt_assert(&self) -> Option<&&'a StmtAssert>
pub fn as_stmt_assert(&self) -> Option<&&'a StmtAssert>
Returns Some if self is a reference of variant StmtAssert, and None otherwise.
Sourcepub fn as_mut_stmt_assert(&mut self) -> Option<&mut &'a StmtAssert>
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.
Sourcepub fn expect_stmt_assert(self) -> &'a StmtAssertwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_assert(self) -> &'a StmtAssertwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtAssert.
§Panics
Panics if the value is not StmtAssert, with a panic message including the content of self.
Sourcepub fn stmt_assert(self) -> Option<&'a StmtAssert>
pub fn stmt_assert(self) -> Option<&'a StmtAssert>
Returns Some if self is of variant StmtAssert, and None otherwise.
Sourcepub const fn is_stmt_import(&self) -> bool
pub const fn is_stmt_import(&self) -> bool
Returns true if self is of variant StmtImport.
Sourcepub fn as_stmt_import(&self) -> Option<&&'a StmtImport>
pub fn as_stmt_import(&self) -> Option<&&'a StmtImport>
Returns Some if self is a reference of variant StmtImport, and None otherwise.
Sourcepub fn as_mut_stmt_import(&mut self) -> Option<&mut &'a StmtImport>
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.
Sourcepub fn expect_stmt_import(self) -> &'a StmtImportwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_import(self) -> &'a StmtImportwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtImport.
§Panics
Panics if the value is not StmtImport, with a panic message including the content of self.
Sourcepub fn stmt_import(self) -> Option<&'a StmtImport>
pub fn stmt_import(self) -> Option<&'a StmtImport>
Returns Some if self is of variant StmtImport, and None otherwise.
Sourcepub const fn is_stmt_import_from(&self) -> bool
pub const fn is_stmt_import_from(&self) -> bool
Returns true if self is of variant StmtImportFrom.
Sourcepub fn as_stmt_import_from(&self) -> Option<&&'a StmtImportFrom>
pub fn as_stmt_import_from(&self) -> Option<&&'a StmtImportFrom>
Returns Some if self is a reference of variant StmtImportFrom, and None otherwise.
Sourcepub fn as_mut_stmt_import_from(&mut self) -> Option<&mut &'a StmtImportFrom>
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.
Sourcepub fn expect_stmt_import_from(self) -> &'a StmtImportFromwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_import_from(self) -> &'a StmtImportFromwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtImportFrom.
§Panics
Panics if the value is not StmtImportFrom, with a panic message including the content of self.
Sourcepub fn stmt_import_from(self) -> Option<&'a StmtImportFrom>
pub fn stmt_import_from(self) -> Option<&'a StmtImportFrom>
Returns Some if self is of variant StmtImportFrom, and None otherwise.
Sourcepub const fn is_stmt_global(&self) -> bool
pub const fn is_stmt_global(&self) -> bool
Returns true if self is of variant StmtGlobal.
Sourcepub fn as_stmt_global(&self) -> Option<&&'a StmtGlobal>
pub fn as_stmt_global(&self) -> Option<&&'a StmtGlobal>
Returns Some if self is a reference of variant StmtGlobal, and None otherwise.
Sourcepub fn as_mut_stmt_global(&mut self) -> Option<&mut &'a StmtGlobal>
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.
Sourcepub fn expect_stmt_global(self) -> &'a StmtGlobalwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_global(self) -> &'a StmtGlobalwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtGlobal.
§Panics
Panics if the value is not StmtGlobal, with a panic message including the content of self.
Sourcepub fn stmt_global(self) -> Option<&'a StmtGlobal>
pub fn stmt_global(self) -> Option<&'a StmtGlobal>
Returns Some if self is of variant StmtGlobal, and None otherwise.
Sourcepub const fn is_stmt_nonlocal(&self) -> bool
pub const fn is_stmt_nonlocal(&self) -> bool
Returns true if self is of variant StmtNonlocal.
Sourcepub fn as_stmt_nonlocal(&self) -> Option<&&'a StmtNonlocal>
pub fn as_stmt_nonlocal(&self) -> Option<&&'a StmtNonlocal>
Returns Some if self is a reference of variant StmtNonlocal, and None otherwise.
Sourcepub fn as_mut_stmt_nonlocal(&mut self) -> Option<&mut &'a StmtNonlocal>
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.
Sourcepub fn expect_stmt_nonlocal(self) -> &'a StmtNonlocalwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_nonlocal(self) -> &'a StmtNonlocalwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtNonlocal.
§Panics
Panics if the value is not StmtNonlocal, with a panic message including the content of self.
Sourcepub fn stmt_nonlocal(self) -> Option<&'a StmtNonlocal>
pub fn stmt_nonlocal(self) -> Option<&'a StmtNonlocal>
Returns Some if self is of variant StmtNonlocal, and None otherwise.
Sourcepub const fn is_stmt_expr(&self) -> bool
pub const fn is_stmt_expr(&self) -> bool
Returns true if self is of variant StmtExpr.
Sourcepub fn as_stmt_expr(&self) -> Option<&&'a StmtExpr>
pub fn as_stmt_expr(&self) -> Option<&&'a StmtExpr>
Returns Some if self is a reference of variant StmtExpr, and None otherwise.
Sourcepub fn as_mut_stmt_expr(&mut self) -> Option<&mut &'a StmtExpr>
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.
Sourcepub fn expect_stmt_expr(self) -> &'a StmtExprwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_expr(self) -> &'a StmtExprwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_expr(self) -> Option<&'a StmtExpr>
pub fn stmt_expr(self) -> Option<&'a StmtExpr>
Returns Some if self is of variant StmtExpr, and None otherwise.
Sourcepub const fn is_stmt_pass(&self) -> bool
pub const fn is_stmt_pass(&self) -> bool
Returns true if self is of variant StmtPass.
Sourcepub fn as_stmt_pass(&self) -> Option<&&'a StmtPass>
pub fn as_stmt_pass(&self) -> Option<&&'a StmtPass>
Returns Some if self is a reference of variant StmtPass, and None otherwise.
Sourcepub fn as_mut_stmt_pass(&mut self) -> Option<&mut &'a StmtPass>
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.
Sourcepub fn expect_stmt_pass(self) -> &'a StmtPasswhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_pass(self) -> &'a StmtPasswhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_pass(self) -> Option<&'a StmtPass>
pub fn stmt_pass(self) -> Option<&'a StmtPass>
Returns Some if self is of variant StmtPass, and None otherwise.
Sourcepub const fn is_stmt_break(&self) -> bool
pub const fn is_stmt_break(&self) -> bool
Returns true if self is of variant StmtBreak.
Sourcepub fn as_stmt_break(&self) -> Option<&&'a StmtBreak>
pub fn as_stmt_break(&self) -> Option<&&'a StmtBreak>
Returns Some if self is a reference of variant StmtBreak, and None otherwise.
Sourcepub fn as_mut_stmt_break(&mut self) -> Option<&mut &'a StmtBreak>
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.
Sourcepub fn expect_stmt_break(self) -> &'a StmtBreakwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_break(self) -> &'a StmtBreakwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn stmt_break(self) -> Option<&'a StmtBreak>
pub fn stmt_break(self) -> Option<&'a StmtBreak>
Returns Some if self is of variant StmtBreak, and None otherwise.
Sourcepub const fn is_stmt_continue(&self) -> bool
pub const fn is_stmt_continue(&self) -> bool
Returns true if self is of variant StmtContinue.
Sourcepub fn as_stmt_continue(&self) -> Option<&&'a StmtContinue>
pub fn as_stmt_continue(&self) -> Option<&&'a StmtContinue>
Returns Some if self is a reference of variant StmtContinue, and None otherwise.
Sourcepub fn as_mut_stmt_continue(&mut self) -> Option<&mut &'a StmtContinue>
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.
Sourcepub fn expect_stmt_continue(self) -> &'a StmtContinuewhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_continue(self) -> &'a StmtContinuewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtContinue.
§Panics
Panics if the value is not StmtContinue, with a panic message including the content of self.
Sourcepub fn stmt_continue(self) -> Option<&'a StmtContinue>
pub fn stmt_continue(self) -> Option<&'a StmtContinue>
Returns Some if self is of variant StmtContinue, and None otherwise.
Sourcepub const fn is_stmt_ipy_escape_command(&self) -> bool
pub const fn is_stmt_ipy_escape_command(&self) -> bool
Returns true if self is of variant StmtIpyEscapeCommand.
Sourcepub fn as_stmt_ipy_escape_command(&self) -> Option<&&'a StmtIpyEscapeCommand>
pub fn as_stmt_ipy_escape_command(&self) -> Option<&&'a StmtIpyEscapeCommand>
Returns Some if self is a reference of variant StmtIpyEscapeCommand, and None otherwise.
Sourcepub fn as_mut_stmt_ipy_escape_command(
&mut self,
) -> Option<&mut &'a StmtIpyEscapeCommand>
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.
Sourcepub fn expect_stmt_ipy_escape_command(self) -> &'a StmtIpyEscapeCommandwhere
AnyNodeRef<'a>: Debug,
pub fn expect_stmt_ipy_escape_command(self) -> &'a StmtIpyEscapeCommandwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StmtIpyEscapeCommand.
§Panics
Panics if the value is not StmtIpyEscapeCommand, with a panic message including the content of self.
Sourcepub fn stmt_ipy_escape_command(self) -> Option<&'a StmtIpyEscapeCommand>
pub fn stmt_ipy_escape_command(self) -> Option<&'a StmtIpyEscapeCommand>
Returns Some if self is of variant StmtIpyEscapeCommand, and None otherwise.
Sourcepub const fn is_expr_bool_op(&self) -> bool
pub const fn is_expr_bool_op(&self) -> bool
Returns true if self is of variant ExprBoolOp.
Sourcepub fn as_expr_bool_op(&self) -> Option<&&'a ExprBoolOp>
pub fn as_expr_bool_op(&self) -> Option<&&'a ExprBoolOp>
Returns Some if self is a reference of variant ExprBoolOp, and None otherwise.
Sourcepub fn as_mut_expr_bool_op(&mut self) -> Option<&mut &'a ExprBoolOp>
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.
Sourcepub fn expect_expr_bool_op(self) -> &'a ExprBoolOpwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_bool_op(self) -> &'a ExprBoolOpwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprBoolOp.
§Panics
Panics if the value is not ExprBoolOp, with a panic message including the content of self.
Sourcepub fn expr_bool_op(self) -> Option<&'a ExprBoolOp>
pub fn expr_bool_op(self) -> Option<&'a ExprBoolOp>
Returns Some if self is of variant ExprBoolOp, and None otherwise.
Sourcepub const fn is_expr_named(&self) -> bool
pub const fn is_expr_named(&self) -> bool
Returns true if self is of variant ExprNamed.
Sourcepub fn as_expr_named(&self) -> Option<&&'a ExprNamed>
pub fn as_expr_named(&self) -> Option<&&'a ExprNamed>
Returns Some if self is a reference of variant ExprNamed, and None otherwise.
Sourcepub fn as_mut_expr_named(&mut self) -> Option<&mut &'a ExprNamed>
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.
Sourcepub fn expect_expr_named(self) -> &'a ExprNamedwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_named(self) -> &'a ExprNamedwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_named(self) -> Option<&'a ExprNamed>
pub fn expr_named(self) -> Option<&'a ExprNamed>
Returns Some if self is of variant ExprNamed, and None otherwise.
Sourcepub const fn is_expr_bin_op(&self) -> bool
pub const fn is_expr_bin_op(&self) -> bool
Returns true if self is of variant ExprBinOp.
Sourcepub fn as_expr_bin_op(&self) -> Option<&&'a ExprBinOp>
pub fn as_expr_bin_op(&self) -> Option<&&'a ExprBinOp>
Returns Some if self is a reference of variant ExprBinOp, and None otherwise.
Sourcepub fn as_mut_expr_bin_op(&mut self) -> Option<&mut &'a ExprBinOp>
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.
Sourcepub fn expect_expr_bin_op(self) -> &'a ExprBinOpwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_bin_op(self) -> &'a ExprBinOpwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_bin_op(self) -> Option<&'a ExprBinOp>
pub fn expr_bin_op(self) -> Option<&'a ExprBinOp>
Returns Some if self is of variant ExprBinOp, and None otherwise.
Sourcepub const fn is_expr_unary_op(&self) -> bool
pub const fn is_expr_unary_op(&self) -> bool
Returns true if self is of variant ExprUnaryOp.
Sourcepub fn as_expr_unary_op(&self) -> Option<&&'a ExprUnaryOp>
pub fn as_expr_unary_op(&self) -> Option<&&'a ExprUnaryOp>
Returns Some if self is a reference of variant ExprUnaryOp, and None otherwise.
Sourcepub fn as_mut_expr_unary_op(&mut self) -> Option<&mut &'a ExprUnaryOp>
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.
Sourcepub fn expect_expr_unary_op(self) -> &'a ExprUnaryOpwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_unary_op(self) -> &'a ExprUnaryOpwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprUnaryOp.
§Panics
Panics if the value is not ExprUnaryOp, with a panic message including the content of self.
Sourcepub fn expr_unary_op(self) -> Option<&'a ExprUnaryOp>
pub fn expr_unary_op(self) -> Option<&'a ExprUnaryOp>
Returns Some if self is of variant ExprUnaryOp, and None otherwise.
Sourcepub const fn is_expr_lambda(&self) -> bool
pub const fn is_expr_lambda(&self) -> bool
Returns true if self is of variant ExprLambda.
Sourcepub fn as_expr_lambda(&self) -> Option<&&'a ExprLambda>
pub fn as_expr_lambda(&self) -> Option<&&'a ExprLambda>
Returns Some if self is a reference of variant ExprLambda, and None otherwise.
Sourcepub fn as_mut_expr_lambda(&mut self) -> Option<&mut &'a ExprLambda>
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.
Sourcepub fn expect_expr_lambda(self) -> &'a ExprLambdawhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_lambda(self) -> &'a ExprLambdawhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprLambda.
§Panics
Panics if the value is not ExprLambda, with a panic message including the content of self.
Sourcepub fn expr_lambda(self) -> Option<&'a ExprLambda>
pub fn expr_lambda(self) -> Option<&'a ExprLambda>
Returns Some if self is of variant ExprLambda, and None otherwise.
Sourcepub const fn is_expr_if(&self) -> bool
pub const fn is_expr_if(&self) -> bool
Returns true if self is of variant ExprIf.
Sourcepub fn as_expr_if(&self) -> Option<&&'a ExprIf>
pub fn as_expr_if(&self) -> Option<&&'a ExprIf>
Returns Some if self is a reference of variant ExprIf, and None otherwise.
Sourcepub fn as_mut_expr_if(&mut self) -> Option<&mut &'a ExprIf>
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.
Sourcepub fn expect_expr_if(self) -> &'a ExprIfwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_if(self) -> &'a ExprIfwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_if(self) -> Option<&'a ExprIf>
pub fn expr_if(self) -> Option<&'a ExprIf>
Returns Some if self is of variant ExprIf, and None otherwise.
Sourcepub const fn is_expr_dict(&self) -> bool
pub const fn is_expr_dict(&self) -> bool
Returns true if self is of variant ExprDict.
Sourcepub fn as_expr_dict(&self) -> Option<&&'a ExprDict>
pub fn as_expr_dict(&self) -> Option<&&'a ExprDict>
Returns Some if self is a reference of variant ExprDict, and None otherwise.
Sourcepub fn as_mut_expr_dict(&mut self) -> Option<&mut &'a ExprDict>
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.
Sourcepub fn expect_expr_dict(self) -> &'a ExprDictwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_dict(self) -> &'a ExprDictwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_dict(self) -> Option<&'a ExprDict>
pub fn expr_dict(self) -> Option<&'a ExprDict>
Returns Some if self is of variant ExprDict, and None otherwise.
Sourcepub const fn is_expr_set(&self) -> bool
pub const fn is_expr_set(&self) -> bool
Returns true if self is of variant ExprSet.
Sourcepub fn as_expr_set(&self) -> Option<&&'a ExprSet>
pub fn as_expr_set(&self) -> Option<&&'a ExprSet>
Returns Some if self is a reference of variant ExprSet, and None otherwise.
Sourcepub fn as_mut_expr_set(&mut self) -> Option<&mut &'a ExprSet>
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.
Sourcepub fn expect_expr_set(self) -> &'a ExprSetwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_set(self) -> &'a ExprSetwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_set(self) -> Option<&'a ExprSet>
pub fn expr_set(self) -> Option<&'a ExprSet>
Returns Some if self is of variant ExprSet, and None otherwise.
Sourcepub const fn is_expr_list_comp(&self) -> bool
pub const fn is_expr_list_comp(&self) -> bool
Returns true if self is of variant ExprListComp.
Sourcepub fn as_expr_list_comp(&self) -> Option<&&'a ExprListComp>
pub fn as_expr_list_comp(&self) -> Option<&&'a ExprListComp>
Returns Some if self is a reference of variant ExprListComp, and None otherwise.
Sourcepub fn as_mut_expr_list_comp(&mut self) -> Option<&mut &'a ExprListComp>
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.
Sourcepub fn expect_expr_list_comp(self) -> &'a ExprListCompwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_list_comp(self) -> &'a ExprListCompwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprListComp.
§Panics
Panics if the value is not ExprListComp, with a panic message including the content of self.
Sourcepub fn expr_list_comp(self) -> Option<&'a ExprListComp>
pub fn expr_list_comp(self) -> Option<&'a ExprListComp>
Returns Some if self is of variant ExprListComp, and None otherwise.
Sourcepub const fn is_expr_set_comp(&self) -> bool
pub const fn is_expr_set_comp(&self) -> bool
Returns true if self is of variant ExprSetComp.
Sourcepub fn as_expr_set_comp(&self) -> Option<&&'a ExprSetComp>
pub fn as_expr_set_comp(&self) -> Option<&&'a ExprSetComp>
Returns Some if self is a reference of variant ExprSetComp, and None otherwise.
Sourcepub fn as_mut_expr_set_comp(&mut self) -> Option<&mut &'a ExprSetComp>
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.
Sourcepub fn expect_expr_set_comp(self) -> &'a ExprSetCompwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_set_comp(self) -> &'a ExprSetCompwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprSetComp.
§Panics
Panics if the value is not ExprSetComp, with a panic message including the content of self.
Sourcepub fn expr_set_comp(self) -> Option<&'a ExprSetComp>
pub fn expr_set_comp(self) -> Option<&'a ExprSetComp>
Returns Some if self is of variant ExprSetComp, and None otherwise.
Sourcepub const fn is_expr_dict_comp(&self) -> bool
pub const fn is_expr_dict_comp(&self) -> bool
Returns true if self is of variant ExprDictComp.
Sourcepub fn as_expr_dict_comp(&self) -> Option<&&'a ExprDictComp>
pub fn as_expr_dict_comp(&self) -> Option<&&'a ExprDictComp>
Returns Some if self is a reference of variant ExprDictComp, and None otherwise.
Sourcepub fn as_mut_expr_dict_comp(&mut self) -> Option<&mut &'a ExprDictComp>
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.
Sourcepub fn expect_expr_dict_comp(self) -> &'a ExprDictCompwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_dict_comp(self) -> &'a ExprDictCompwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprDictComp.
§Panics
Panics if the value is not ExprDictComp, with a panic message including the content of self.
Sourcepub fn expr_dict_comp(self) -> Option<&'a ExprDictComp>
pub fn expr_dict_comp(self) -> Option<&'a ExprDictComp>
Returns Some if self is of variant ExprDictComp, and None otherwise.
Sourcepub const fn is_expr_generator(&self) -> bool
pub const fn is_expr_generator(&self) -> bool
Returns true if self is of variant ExprGenerator.
Sourcepub fn as_expr_generator(&self) -> Option<&&'a ExprGenerator>
pub fn as_expr_generator(&self) -> Option<&&'a ExprGenerator>
Returns Some if self is a reference of variant ExprGenerator, and None otherwise.
Sourcepub fn as_mut_expr_generator(&mut self) -> Option<&mut &'a ExprGenerator>
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.
Sourcepub fn expect_expr_generator(self) -> &'a ExprGeneratorwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_generator(self) -> &'a ExprGeneratorwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprGenerator.
§Panics
Panics if the value is not ExprGenerator, with a panic message including the content of self.
Sourcepub fn expr_generator(self) -> Option<&'a ExprGenerator>
pub fn expr_generator(self) -> Option<&'a ExprGenerator>
Returns Some if self is of variant ExprGenerator, and None otherwise.
Sourcepub const fn is_expr_await(&self) -> bool
pub const fn is_expr_await(&self) -> bool
Returns true if self is of variant ExprAwait.
Sourcepub fn as_expr_await(&self) -> Option<&&'a ExprAwait>
pub fn as_expr_await(&self) -> Option<&&'a ExprAwait>
Returns Some if self is a reference of variant ExprAwait, and None otherwise.
Sourcepub fn as_mut_expr_await(&mut self) -> Option<&mut &'a ExprAwait>
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.
Sourcepub fn expect_expr_await(self) -> &'a ExprAwaitwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_await(self) -> &'a ExprAwaitwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_await(self) -> Option<&'a ExprAwait>
pub fn expr_await(self) -> Option<&'a ExprAwait>
Returns Some if self is of variant ExprAwait, and None otherwise.
Sourcepub const fn is_expr_yield(&self) -> bool
pub const fn is_expr_yield(&self) -> bool
Returns true if self is of variant ExprYield.
Sourcepub fn as_expr_yield(&self) -> Option<&&'a ExprYield>
pub fn as_expr_yield(&self) -> Option<&&'a ExprYield>
Returns Some if self is a reference of variant ExprYield, and None otherwise.
Sourcepub fn as_mut_expr_yield(&mut self) -> Option<&mut &'a ExprYield>
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.
Sourcepub fn expect_expr_yield(self) -> &'a ExprYieldwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_yield(self) -> &'a ExprYieldwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_yield(self) -> Option<&'a ExprYield>
pub fn expr_yield(self) -> Option<&'a ExprYield>
Returns Some if self is of variant ExprYield, and None otherwise.
Sourcepub const fn is_expr_yield_from(&self) -> bool
pub const fn is_expr_yield_from(&self) -> bool
Returns true if self is of variant ExprYieldFrom.
Sourcepub fn as_expr_yield_from(&self) -> Option<&&'a ExprYieldFrom>
pub fn as_expr_yield_from(&self) -> Option<&&'a ExprYieldFrom>
Returns Some if self is a reference of variant ExprYieldFrom, and None otherwise.
Sourcepub fn as_mut_expr_yield_from(&mut self) -> Option<&mut &'a ExprYieldFrom>
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.
Sourcepub fn expect_expr_yield_from(self) -> &'a ExprYieldFromwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_yield_from(self) -> &'a ExprYieldFromwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprYieldFrom.
§Panics
Panics if the value is not ExprYieldFrom, with a panic message including the content of self.
Sourcepub fn expr_yield_from(self) -> Option<&'a ExprYieldFrom>
pub fn expr_yield_from(self) -> Option<&'a ExprYieldFrom>
Returns Some if self is of variant ExprYieldFrom, and None otherwise.
Sourcepub const fn is_expr_compare(&self) -> bool
pub const fn is_expr_compare(&self) -> bool
Returns true if self is of variant ExprCompare.
Sourcepub fn as_expr_compare(&self) -> Option<&&'a ExprCompare>
pub fn as_expr_compare(&self) -> Option<&&'a ExprCompare>
Returns Some if self is a reference of variant ExprCompare, and None otherwise.
Sourcepub fn as_mut_expr_compare(&mut self) -> Option<&mut &'a ExprCompare>
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.
Sourcepub fn expect_expr_compare(self) -> &'a ExprComparewhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_compare(self) -> &'a ExprComparewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprCompare.
§Panics
Panics if the value is not ExprCompare, with a panic message including the content of self.
Sourcepub fn expr_compare(self) -> Option<&'a ExprCompare>
pub fn expr_compare(self) -> Option<&'a ExprCompare>
Returns Some if self is of variant ExprCompare, and None otherwise.
Sourcepub const fn is_expr_call(&self) -> bool
pub const fn is_expr_call(&self) -> bool
Returns true if self is of variant ExprCall.
Sourcepub fn as_expr_call(&self) -> Option<&&'a ExprCall>
pub fn as_expr_call(&self) -> Option<&&'a ExprCall>
Returns Some if self is a reference of variant ExprCall, and None otherwise.
Sourcepub fn as_mut_expr_call(&mut self) -> Option<&mut &'a ExprCall>
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.
Sourcepub fn expect_expr_call(self) -> &'a ExprCallwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_call(self) -> &'a ExprCallwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_call(self) -> Option<&'a ExprCall>
pub fn expr_call(self) -> Option<&'a ExprCall>
Returns Some if self is of variant ExprCall, and None otherwise.
Sourcepub const fn is_expr_f_string(&self) -> bool
pub const fn is_expr_f_string(&self) -> bool
Returns true if self is of variant ExprFString.
Sourcepub fn as_expr_f_string(&self) -> Option<&&'a ExprFString>
pub fn as_expr_f_string(&self) -> Option<&&'a ExprFString>
Returns Some if self is a reference of variant ExprFString, and None otherwise.
Sourcepub fn as_mut_expr_f_string(&mut self) -> Option<&mut &'a ExprFString>
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.
Sourcepub fn expect_expr_f_string(self) -> &'a ExprFStringwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_f_string(self) -> &'a ExprFStringwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprFString.
§Panics
Panics if the value is not ExprFString, with a panic message including the content of self.
Sourcepub fn expr_f_string(self) -> Option<&'a ExprFString>
pub fn expr_f_string(self) -> Option<&'a ExprFString>
Returns Some if self is of variant ExprFString, and None otherwise.
Sourcepub const fn is_expr_t_string(&self) -> bool
pub const fn is_expr_t_string(&self) -> bool
Returns true if self is of variant ExprTString.
Sourcepub fn as_expr_t_string(&self) -> Option<&&'a ExprTString>
pub fn as_expr_t_string(&self) -> Option<&&'a ExprTString>
Returns Some if self is a reference of variant ExprTString, and None otherwise.
Sourcepub fn as_mut_expr_t_string(&mut self) -> Option<&mut &'a ExprTString>
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.
Sourcepub fn expect_expr_t_string(self) -> &'a ExprTStringwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_t_string(self) -> &'a ExprTStringwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprTString.
§Panics
Panics if the value is not ExprTString, with a panic message including the content of self.
Sourcepub fn expr_t_string(self) -> Option<&'a ExprTString>
pub fn expr_t_string(self) -> Option<&'a ExprTString>
Returns Some if self is of variant ExprTString, and None otherwise.
Sourcepub const fn is_expr_string_literal(&self) -> bool
pub const fn is_expr_string_literal(&self) -> bool
Returns true if self is of variant ExprStringLiteral.
Sourcepub fn as_expr_string_literal(&self) -> Option<&&'a ExprStringLiteral>
pub fn as_expr_string_literal(&self) -> Option<&&'a ExprStringLiteral>
Returns Some if self is a reference of variant ExprStringLiteral, and None otherwise.
Sourcepub fn as_mut_expr_string_literal(
&mut self,
) -> Option<&mut &'a ExprStringLiteral>
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.
Sourcepub fn expect_expr_string_literal(self) -> &'a ExprStringLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_string_literal(self) -> &'a ExprStringLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprStringLiteral.
§Panics
Panics if the value is not ExprStringLiteral, with a panic message including the content of self.
Sourcepub fn expr_string_literal(self) -> Option<&'a ExprStringLiteral>
pub fn expr_string_literal(self) -> Option<&'a ExprStringLiteral>
Returns Some if self is of variant ExprStringLiteral, and None otherwise.
Sourcepub const fn is_expr_bytes_literal(&self) -> bool
pub const fn is_expr_bytes_literal(&self) -> bool
Returns true if self is of variant ExprBytesLiteral.
Sourcepub fn as_expr_bytes_literal(&self) -> Option<&&'a ExprBytesLiteral>
pub fn as_expr_bytes_literal(&self) -> Option<&&'a ExprBytesLiteral>
Returns Some if self is a reference of variant ExprBytesLiteral, and None otherwise.
Sourcepub fn as_mut_expr_bytes_literal(&mut self) -> Option<&mut &'a ExprBytesLiteral>
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.
Sourcepub fn expect_expr_bytes_literal(self) -> &'a ExprBytesLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_bytes_literal(self) -> &'a ExprBytesLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprBytesLiteral.
§Panics
Panics if the value is not ExprBytesLiteral, with a panic message including the content of self.
Sourcepub fn expr_bytes_literal(self) -> Option<&'a ExprBytesLiteral>
pub fn expr_bytes_literal(self) -> Option<&'a ExprBytesLiteral>
Returns Some if self is of variant ExprBytesLiteral, and None otherwise.
Sourcepub const fn is_expr_number_literal(&self) -> bool
pub const fn is_expr_number_literal(&self) -> bool
Returns true if self is of variant ExprNumberLiteral.
Sourcepub fn as_expr_number_literal(&self) -> Option<&&'a ExprNumberLiteral>
pub fn as_expr_number_literal(&self) -> Option<&&'a ExprNumberLiteral>
Returns Some if self is a reference of variant ExprNumberLiteral, and None otherwise.
Sourcepub fn as_mut_expr_number_literal(
&mut self,
) -> Option<&mut &'a ExprNumberLiteral>
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.
Sourcepub fn expect_expr_number_literal(self) -> &'a ExprNumberLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_number_literal(self) -> &'a ExprNumberLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprNumberLiteral.
§Panics
Panics if the value is not ExprNumberLiteral, with a panic message including the content of self.
Sourcepub fn expr_number_literal(self) -> Option<&'a ExprNumberLiteral>
pub fn expr_number_literal(self) -> Option<&'a ExprNumberLiteral>
Returns Some if self is of variant ExprNumberLiteral, and None otherwise.
Sourcepub const fn is_expr_boolean_literal(&self) -> bool
pub const fn is_expr_boolean_literal(&self) -> bool
Returns true if self is of variant ExprBooleanLiteral.
Sourcepub fn as_expr_boolean_literal(&self) -> Option<&&'a ExprBooleanLiteral>
pub fn as_expr_boolean_literal(&self) -> Option<&&'a ExprBooleanLiteral>
Returns Some if self is a reference of variant ExprBooleanLiteral, and None otherwise.
Sourcepub fn as_mut_expr_boolean_literal(
&mut self,
) -> Option<&mut &'a ExprBooleanLiteral>
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.
Sourcepub fn expect_expr_boolean_literal(self) -> &'a ExprBooleanLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_boolean_literal(self) -> &'a ExprBooleanLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprBooleanLiteral.
§Panics
Panics if the value is not ExprBooleanLiteral, with a panic message including the content of self.
Sourcepub fn expr_boolean_literal(self) -> Option<&'a ExprBooleanLiteral>
pub fn expr_boolean_literal(self) -> Option<&'a ExprBooleanLiteral>
Returns Some if self is of variant ExprBooleanLiteral, and None otherwise.
Sourcepub const fn is_expr_none_literal(&self) -> bool
pub const fn is_expr_none_literal(&self) -> bool
Returns true if self is of variant ExprNoneLiteral.
Sourcepub fn as_expr_none_literal(&self) -> Option<&&'a ExprNoneLiteral>
pub fn as_expr_none_literal(&self) -> Option<&&'a ExprNoneLiteral>
Returns Some if self is a reference of variant ExprNoneLiteral, and None otherwise.
Sourcepub fn as_mut_expr_none_literal(&mut self) -> Option<&mut &'a ExprNoneLiteral>
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.
Sourcepub fn expect_expr_none_literal(self) -> &'a ExprNoneLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_none_literal(self) -> &'a ExprNoneLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprNoneLiteral.
§Panics
Panics if the value is not ExprNoneLiteral, with a panic message including the content of self.
Sourcepub fn expr_none_literal(self) -> Option<&'a ExprNoneLiteral>
pub fn expr_none_literal(self) -> Option<&'a ExprNoneLiteral>
Returns Some if self is of variant ExprNoneLiteral, and None otherwise.
Sourcepub const fn is_expr_ellipsis_literal(&self) -> bool
pub const fn is_expr_ellipsis_literal(&self) -> bool
Returns true if self is of variant ExprEllipsisLiteral.
Sourcepub fn as_expr_ellipsis_literal(&self) -> Option<&&'a ExprEllipsisLiteral>
pub fn as_expr_ellipsis_literal(&self) -> Option<&&'a ExprEllipsisLiteral>
Returns Some if self is a reference of variant ExprEllipsisLiteral, and None otherwise.
Sourcepub fn as_mut_expr_ellipsis_literal(
&mut self,
) -> Option<&mut &'a ExprEllipsisLiteral>
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.
Sourcepub fn expect_expr_ellipsis_literal(self) -> &'a ExprEllipsisLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_ellipsis_literal(self) -> &'a ExprEllipsisLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprEllipsisLiteral.
§Panics
Panics if the value is not ExprEllipsisLiteral, with a panic message including the content of self.
Sourcepub fn expr_ellipsis_literal(self) -> Option<&'a ExprEllipsisLiteral>
pub fn expr_ellipsis_literal(self) -> Option<&'a ExprEllipsisLiteral>
Returns Some if self is of variant ExprEllipsisLiteral, and None otherwise.
Sourcepub const fn is_expr_attribute(&self) -> bool
pub const fn is_expr_attribute(&self) -> bool
Returns true if self is of variant ExprAttribute.
Sourcepub fn as_expr_attribute(&self) -> Option<&&'a ExprAttribute>
pub fn as_expr_attribute(&self) -> Option<&&'a ExprAttribute>
Returns Some if self is a reference of variant ExprAttribute, and None otherwise.
Sourcepub fn as_mut_expr_attribute(&mut self) -> Option<&mut &'a ExprAttribute>
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.
Sourcepub fn expect_expr_attribute(self) -> &'a ExprAttributewhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_attribute(self) -> &'a ExprAttributewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprAttribute.
§Panics
Panics if the value is not ExprAttribute, with a panic message including the content of self.
Sourcepub fn expr_attribute(self) -> Option<&'a ExprAttribute>
pub fn expr_attribute(self) -> Option<&'a ExprAttribute>
Returns Some if self is of variant ExprAttribute, and None otherwise.
Sourcepub const fn is_expr_subscript(&self) -> bool
pub const fn is_expr_subscript(&self) -> bool
Returns true if self is of variant ExprSubscript.
Sourcepub fn as_expr_subscript(&self) -> Option<&&'a ExprSubscript>
pub fn as_expr_subscript(&self) -> Option<&&'a ExprSubscript>
Returns Some if self is a reference of variant ExprSubscript, and None otherwise.
Sourcepub fn as_mut_expr_subscript(&mut self) -> Option<&mut &'a ExprSubscript>
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.
Sourcepub fn expect_expr_subscript(self) -> &'a ExprSubscriptwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_subscript(self) -> &'a ExprSubscriptwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprSubscript.
§Panics
Panics if the value is not ExprSubscript, with a panic message including the content of self.
Sourcepub fn expr_subscript(self) -> Option<&'a ExprSubscript>
pub fn expr_subscript(self) -> Option<&'a ExprSubscript>
Returns Some if self is of variant ExprSubscript, and None otherwise.
Sourcepub const fn is_expr_starred(&self) -> bool
pub const fn is_expr_starred(&self) -> bool
Returns true if self is of variant ExprStarred.
Sourcepub fn as_expr_starred(&self) -> Option<&&'a ExprStarred>
pub fn as_expr_starred(&self) -> Option<&&'a ExprStarred>
Returns Some if self is a reference of variant ExprStarred, and None otherwise.
Sourcepub fn as_mut_expr_starred(&mut self) -> Option<&mut &'a ExprStarred>
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.
Sourcepub fn expect_expr_starred(self) -> &'a ExprStarredwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_starred(self) -> &'a ExprStarredwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprStarred.
§Panics
Panics if the value is not ExprStarred, with a panic message including the content of self.
Sourcepub fn expr_starred(self) -> Option<&'a ExprStarred>
pub fn expr_starred(self) -> Option<&'a ExprStarred>
Returns Some if self is of variant ExprStarred, and None otherwise.
Sourcepub const fn is_expr_name(&self) -> bool
pub const fn is_expr_name(&self) -> bool
Returns true if self is of variant ExprName.
Sourcepub fn as_expr_name(&self) -> Option<&&'a ExprName>
pub fn as_expr_name(&self) -> Option<&&'a ExprName>
Returns Some if self is a reference of variant ExprName, and None otherwise.
Sourcepub fn as_mut_expr_name(&mut self) -> Option<&mut &'a ExprName>
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.
Sourcepub fn expect_expr_name(self) -> &'a ExprNamewhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_name(self) -> &'a ExprNamewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_name(self) -> Option<&'a ExprName>
pub fn expr_name(self) -> Option<&'a ExprName>
Returns Some if self is of variant ExprName, and None otherwise.
Sourcepub const fn is_expr_list(&self) -> bool
pub const fn is_expr_list(&self) -> bool
Returns true if self is of variant ExprList.
Sourcepub fn as_expr_list(&self) -> Option<&&'a ExprList>
pub fn as_expr_list(&self) -> Option<&&'a ExprList>
Returns Some if self is a reference of variant ExprList, and None otherwise.
Sourcepub fn as_mut_expr_list(&mut self) -> Option<&mut &'a ExprList>
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.
Sourcepub fn expect_expr_list(self) -> &'a ExprListwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_list(self) -> &'a ExprListwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_list(self) -> Option<&'a ExprList>
pub fn expr_list(self) -> Option<&'a ExprList>
Returns Some if self is of variant ExprList, and None otherwise.
Sourcepub const fn is_expr_tuple(&self) -> bool
pub const fn is_expr_tuple(&self) -> bool
Returns true if self is of variant ExprTuple.
Sourcepub fn as_expr_tuple(&self) -> Option<&&'a ExprTuple>
pub fn as_expr_tuple(&self) -> Option<&&'a ExprTuple>
Returns Some if self is a reference of variant ExprTuple, and None otherwise.
Sourcepub fn as_mut_expr_tuple(&mut self) -> Option<&mut &'a ExprTuple>
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.
Sourcepub fn expect_expr_tuple(self) -> &'a ExprTuplewhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_tuple(self) -> &'a ExprTuplewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_tuple(self) -> Option<&'a ExprTuple>
pub fn expr_tuple(self) -> Option<&'a ExprTuple>
Returns Some if self is of variant ExprTuple, and None otherwise.
Sourcepub const fn is_expr_slice(&self) -> bool
pub const fn is_expr_slice(&self) -> bool
Returns true if self is of variant ExprSlice.
Sourcepub fn as_expr_slice(&self) -> Option<&&'a ExprSlice>
pub fn as_expr_slice(&self) -> Option<&&'a ExprSlice>
Returns Some if self is a reference of variant ExprSlice, and None otherwise.
Sourcepub fn as_mut_expr_slice(&mut self) -> Option<&mut &'a ExprSlice>
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.
Sourcepub fn expect_expr_slice(self) -> &'a ExprSlicewhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_slice(self) -> &'a ExprSlicewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn expr_slice(self) -> Option<&'a ExprSlice>
pub fn expr_slice(self) -> Option<&'a ExprSlice>
Returns Some if self is of variant ExprSlice, and None otherwise.
Sourcepub const fn is_expr_ipy_escape_command(&self) -> bool
pub const fn is_expr_ipy_escape_command(&self) -> bool
Returns true if self is of variant ExprIpyEscapeCommand.
Sourcepub fn as_expr_ipy_escape_command(&self) -> Option<&&'a ExprIpyEscapeCommand>
pub fn as_expr_ipy_escape_command(&self) -> Option<&&'a ExprIpyEscapeCommand>
Returns Some if self is a reference of variant ExprIpyEscapeCommand, and None otherwise.
Sourcepub fn as_mut_expr_ipy_escape_command(
&mut self,
) -> Option<&mut &'a ExprIpyEscapeCommand>
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.
Sourcepub fn expect_expr_ipy_escape_command(self) -> &'a ExprIpyEscapeCommandwhere
AnyNodeRef<'a>: Debug,
pub fn expect_expr_ipy_escape_command(self) -> &'a ExprIpyEscapeCommandwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExprIpyEscapeCommand.
§Panics
Panics if the value is not ExprIpyEscapeCommand, with a panic message including the content of self.
Sourcepub fn expr_ipy_escape_command(self) -> Option<&'a ExprIpyEscapeCommand>
pub fn expr_ipy_escape_command(self) -> Option<&'a ExprIpyEscapeCommand>
Returns Some if self is of variant ExprIpyEscapeCommand, and None otherwise.
Sourcepub const fn is_except_handler_except_handler(&self) -> bool
pub const fn is_except_handler_except_handler(&self) -> bool
Returns true if self is of variant ExceptHandlerExceptHandler.
Sourcepub fn as_except_handler_except_handler(
&self,
) -> Option<&&'a ExceptHandlerExceptHandler>
pub fn as_except_handler_except_handler( &self, ) -> Option<&&'a ExceptHandlerExceptHandler>
Returns Some if self is a reference of variant ExceptHandlerExceptHandler, and None otherwise.
Sourcepub fn as_mut_except_handler_except_handler(
&mut self,
) -> Option<&mut &'a ExceptHandlerExceptHandler>
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.
Sourcepub fn expect_except_handler_except_handler(
self,
) -> &'a ExceptHandlerExceptHandlerwhere
AnyNodeRef<'a>: Debug,
pub fn expect_except_handler_except_handler(
self,
) -> &'a ExceptHandlerExceptHandlerwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ExceptHandlerExceptHandler.
§Panics
Panics if the value is not ExceptHandlerExceptHandler, with a panic message including the content of self.
Sourcepub fn except_handler_except_handler(
self,
) -> Option<&'a ExceptHandlerExceptHandler>
pub fn except_handler_except_handler( self, ) -> Option<&'a ExceptHandlerExceptHandler>
Returns Some if self is of variant ExceptHandlerExceptHandler, and None otherwise.
Sourcepub const fn is_interpolated_element(&self) -> bool
pub const fn is_interpolated_element(&self) -> bool
Returns true if self is of variant InterpolatedElement.
Sourcepub fn as_interpolated_element(&self) -> Option<&&'a InterpolatedElement>
pub fn as_interpolated_element(&self) -> Option<&&'a InterpolatedElement>
Returns Some if self is a reference of variant InterpolatedElement, and None otherwise.
Sourcepub fn as_mut_interpolated_element(
&mut self,
) -> Option<&mut &'a InterpolatedElement>
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.
Sourcepub fn expect_interpolated_element(self) -> &'a InterpolatedElementwhere
AnyNodeRef<'a>: Debug,
pub fn expect_interpolated_element(self) -> &'a InterpolatedElementwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of InterpolatedElement.
§Panics
Panics if the value is not InterpolatedElement, with a panic message including the content of self.
Sourcepub fn interpolated_element(self) -> Option<&'a InterpolatedElement>
pub fn interpolated_element(self) -> Option<&'a InterpolatedElement>
Returns Some if self is of variant InterpolatedElement, and None otherwise.
Sourcepub const fn is_interpolated_string_literal_element(&self) -> bool
pub const fn is_interpolated_string_literal_element(&self) -> bool
Returns true if self is of variant InterpolatedStringLiteralElement.
Sourcepub fn as_interpolated_string_literal_element(
&self,
) -> Option<&&'a InterpolatedStringLiteralElement>
pub fn as_interpolated_string_literal_element( &self, ) -> Option<&&'a InterpolatedStringLiteralElement>
Returns Some if self is a reference of variant InterpolatedStringLiteralElement, and None otherwise.
Sourcepub fn as_mut_interpolated_string_literal_element(
&mut self,
) -> Option<&mut &'a InterpolatedStringLiteralElement>
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.
Sourcepub fn expect_interpolated_string_literal_element(
self,
) -> &'a InterpolatedStringLiteralElementwhere
AnyNodeRef<'a>: Debug,
pub fn expect_interpolated_string_literal_element(
self,
) -> &'a InterpolatedStringLiteralElementwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of InterpolatedStringLiteralElement.
§Panics
Panics if the value is not InterpolatedStringLiteralElement, with a panic message including the content of self.
Sourcepub fn interpolated_string_literal_element(
self,
) -> Option<&'a InterpolatedStringLiteralElement>
pub fn interpolated_string_literal_element( self, ) -> Option<&'a InterpolatedStringLiteralElement>
Returns Some if self is of variant InterpolatedStringLiteralElement, and None otherwise.
Sourcepub const fn is_pattern_match_value(&self) -> bool
pub const fn is_pattern_match_value(&self) -> bool
Returns true if self is of variant PatternMatchValue.
Sourcepub fn as_pattern_match_value(&self) -> Option<&&'a PatternMatchValue>
pub fn as_pattern_match_value(&self) -> Option<&&'a PatternMatchValue>
Returns Some if self is a reference of variant PatternMatchValue, and None otherwise.
Sourcepub fn as_mut_pattern_match_value(
&mut self,
) -> Option<&mut &'a PatternMatchValue>
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.
Sourcepub fn expect_pattern_match_value(self) -> &'a PatternMatchValuewhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_value(self) -> &'a PatternMatchValuewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchValue.
§Panics
Panics if the value is not PatternMatchValue, with a panic message including the content of self.
Sourcepub fn pattern_match_value(self) -> Option<&'a PatternMatchValue>
pub fn pattern_match_value(self) -> Option<&'a PatternMatchValue>
Returns Some if self is of variant PatternMatchValue, and None otherwise.
Sourcepub const fn is_pattern_match_singleton(&self) -> bool
pub const fn is_pattern_match_singleton(&self) -> bool
Returns true if self is of variant PatternMatchSingleton.
Sourcepub fn as_pattern_match_singleton(&self) -> Option<&&'a PatternMatchSingleton>
pub fn as_pattern_match_singleton(&self) -> Option<&&'a PatternMatchSingleton>
Returns Some if self is a reference of variant PatternMatchSingleton, and None otherwise.
Sourcepub fn as_mut_pattern_match_singleton(
&mut self,
) -> Option<&mut &'a PatternMatchSingleton>
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.
Sourcepub fn expect_pattern_match_singleton(self) -> &'a PatternMatchSingletonwhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_singleton(self) -> &'a PatternMatchSingletonwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchSingleton.
§Panics
Panics if the value is not PatternMatchSingleton, with a panic message including the content of self.
Sourcepub fn pattern_match_singleton(self) -> Option<&'a PatternMatchSingleton>
pub fn pattern_match_singleton(self) -> Option<&'a PatternMatchSingleton>
Returns Some if self is of variant PatternMatchSingleton, and None otherwise.
Sourcepub const fn is_pattern_match_sequence(&self) -> bool
pub const fn is_pattern_match_sequence(&self) -> bool
Returns true if self is of variant PatternMatchSequence.
Sourcepub fn as_pattern_match_sequence(&self) -> Option<&&'a PatternMatchSequence>
pub fn as_pattern_match_sequence(&self) -> Option<&&'a PatternMatchSequence>
Returns Some if self is a reference of variant PatternMatchSequence, and None otherwise.
Sourcepub fn as_mut_pattern_match_sequence(
&mut self,
) -> Option<&mut &'a PatternMatchSequence>
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.
Sourcepub fn expect_pattern_match_sequence(self) -> &'a PatternMatchSequencewhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_sequence(self) -> &'a PatternMatchSequencewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchSequence.
§Panics
Panics if the value is not PatternMatchSequence, with a panic message including the content of self.
Sourcepub fn pattern_match_sequence(self) -> Option<&'a PatternMatchSequence>
pub fn pattern_match_sequence(self) -> Option<&'a PatternMatchSequence>
Returns Some if self is of variant PatternMatchSequence, and None otherwise.
Sourcepub const fn is_pattern_match_mapping(&self) -> bool
pub const fn is_pattern_match_mapping(&self) -> bool
Returns true if self is of variant PatternMatchMapping.
Sourcepub fn as_pattern_match_mapping(&self) -> Option<&&'a PatternMatchMapping>
pub fn as_pattern_match_mapping(&self) -> Option<&&'a PatternMatchMapping>
Returns Some if self is a reference of variant PatternMatchMapping, and None otherwise.
Sourcepub fn as_mut_pattern_match_mapping(
&mut self,
) -> Option<&mut &'a PatternMatchMapping>
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.
Sourcepub fn expect_pattern_match_mapping(self) -> &'a PatternMatchMappingwhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_mapping(self) -> &'a PatternMatchMappingwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchMapping.
§Panics
Panics if the value is not PatternMatchMapping, with a panic message including the content of self.
Sourcepub fn pattern_match_mapping(self) -> Option<&'a PatternMatchMapping>
pub fn pattern_match_mapping(self) -> Option<&'a PatternMatchMapping>
Returns Some if self is of variant PatternMatchMapping, and None otherwise.
Sourcepub const fn is_pattern_match_class(&self) -> bool
pub const fn is_pattern_match_class(&self) -> bool
Returns true if self is of variant PatternMatchClass.
Sourcepub fn as_pattern_match_class(&self) -> Option<&&'a PatternMatchClass>
pub fn as_pattern_match_class(&self) -> Option<&&'a PatternMatchClass>
Returns Some if self is a reference of variant PatternMatchClass, and None otherwise.
Sourcepub fn as_mut_pattern_match_class(
&mut self,
) -> Option<&mut &'a PatternMatchClass>
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.
Sourcepub fn expect_pattern_match_class(self) -> &'a PatternMatchClasswhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_class(self) -> &'a PatternMatchClasswhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchClass.
§Panics
Panics if the value is not PatternMatchClass, with a panic message including the content of self.
Sourcepub fn pattern_match_class(self) -> Option<&'a PatternMatchClass>
pub fn pattern_match_class(self) -> Option<&'a PatternMatchClass>
Returns Some if self is of variant PatternMatchClass, and None otherwise.
Sourcepub const fn is_pattern_match_star(&self) -> bool
pub const fn is_pattern_match_star(&self) -> bool
Returns true if self is of variant PatternMatchStar.
Sourcepub fn as_pattern_match_star(&self) -> Option<&&'a PatternMatchStar>
pub fn as_pattern_match_star(&self) -> Option<&&'a PatternMatchStar>
Returns Some if self is a reference of variant PatternMatchStar, and None otherwise.
Sourcepub fn as_mut_pattern_match_star(&mut self) -> Option<&mut &'a PatternMatchStar>
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.
Sourcepub fn expect_pattern_match_star(self) -> &'a PatternMatchStarwhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_star(self) -> &'a PatternMatchStarwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchStar.
§Panics
Panics if the value is not PatternMatchStar, with a panic message including the content of self.
Sourcepub fn pattern_match_star(self) -> Option<&'a PatternMatchStar>
pub fn pattern_match_star(self) -> Option<&'a PatternMatchStar>
Returns Some if self is of variant PatternMatchStar, and None otherwise.
Sourcepub const fn is_pattern_match_as(&self) -> bool
pub const fn is_pattern_match_as(&self) -> bool
Returns true if self is of variant PatternMatchAs.
Sourcepub fn as_pattern_match_as(&self) -> Option<&&'a PatternMatchAs>
pub fn as_pattern_match_as(&self) -> Option<&&'a PatternMatchAs>
Returns Some if self is a reference of variant PatternMatchAs, and None otherwise.
Sourcepub fn as_mut_pattern_match_as(&mut self) -> Option<&mut &'a PatternMatchAs>
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.
Sourcepub fn expect_pattern_match_as(self) -> &'a PatternMatchAswhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_as(self) -> &'a PatternMatchAswhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchAs.
§Panics
Panics if the value is not PatternMatchAs, with a panic message including the content of self.
Sourcepub fn pattern_match_as(self) -> Option<&'a PatternMatchAs>
pub fn pattern_match_as(self) -> Option<&'a PatternMatchAs>
Returns Some if self is of variant PatternMatchAs, and None otherwise.
Sourcepub const fn is_pattern_match_or(&self) -> bool
pub const fn is_pattern_match_or(&self) -> bool
Returns true if self is of variant PatternMatchOr.
Sourcepub fn as_pattern_match_or(&self) -> Option<&&'a PatternMatchOr>
pub fn as_pattern_match_or(&self) -> Option<&&'a PatternMatchOr>
Returns Some if self is a reference of variant PatternMatchOr, and None otherwise.
Sourcepub fn as_mut_pattern_match_or(&mut self) -> Option<&mut &'a PatternMatchOr>
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.
Sourcepub fn expect_pattern_match_or(self) -> &'a PatternMatchOrwhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_match_or(self) -> &'a PatternMatchOrwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternMatchOr.
§Panics
Panics if the value is not PatternMatchOr, with a panic message including the content of self.
Sourcepub fn pattern_match_or(self) -> Option<&'a PatternMatchOr>
pub fn pattern_match_or(self) -> Option<&'a PatternMatchOr>
Returns Some if self is of variant PatternMatchOr, and None otherwise.
Sourcepub const fn is_type_param_type_var(&self) -> bool
pub const fn is_type_param_type_var(&self) -> bool
Returns true if self is of variant TypeParamTypeVar.
Sourcepub fn as_type_param_type_var(&self) -> Option<&&'a TypeParamTypeVar>
pub fn as_type_param_type_var(&self) -> Option<&&'a TypeParamTypeVar>
Returns Some if self is a reference of variant TypeParamTypeVar, and None otherwise.
Sourcepub fn as_mut_type_param_type_var(
&mut self,
) -> Option<&mut &'a TypeParamTypeVar>
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.
Sourcepub fn expect_type_param_type_var(self) -> &'a TypeParamTypeVarwhere
AnyNodeRef<'a>: Debug,
pub fn expect_type_param_type_var(self) -> &'a TypeParamTypeVarwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of TypeParamTypeVar.
§Panics
Panics if the value is not TypeParamTypeVar, with a panic message including the content of self.
Sourcepub fn type_param_type_var(self) -> Option<&'a TypeParamTypeVar>
pub fn type_param_type_var(self) -> Option<&'a TypeParamTypeVar>
Returns Some if self is of variant TypeParamTypeVar, and None otherwise.
Sourcepub const fn is_type_param_type_var_tuple(&self) -> bool
pub const fn is_type_param_type_var_tuple(&self) -> bool
Returns true if self is of variant TypeParamTypeVarTuple.
Sourcepub fn as_type_param_type_var_tuple(&self) -> Option<&&'a TypeParamTypeVarTuple>
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.
Sourcepub fn as_mut_type_param_type_var_tuple(
&mut self,
) -> Option<&mut &'a TypeParamTypeVarTuple>
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.
Sourcepub fn expect_type_param_type_var_tuple(self) -> &'a TypeParamTypeVarTuplewhere
AnyNodeRef<'a>: Debug,
pub fn expect_type_param_type_var_tuple(self) -> &'a TypeParamTypeVarTuplewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of TypeParamTypeVarTuple.
§Panics
Panics if the value is not TypeParamTypeVarTuple, with a panic message including the content of self.
Sourcepub fn type_param_type_var_tuple(self) -> Option<&'a TypeParamTypeVarTuple>
pub fn type_param_type_var_tuple(self) -> Option<&'a TypeParamTypeVarTuple>
Returns Some if self is of variant TypeParamTypeVarTuple, and None otherwise.
Sourcepub const fn is_type_param_param_spec(&self) -> bool
pub const fn is_type_param_param_spec(&self) -> bool
Returns true if self is of variant TypeParamParamSpec.
Sourcepub fn as_type_param_param_spec(&self) -> Option<&&'a TypeParamParamSpec>
pub fn as_type_param_param_spec(&self) -> Option<&&'a TypeParamParamSpec>
Returns Some if self is a reference of variant TypeParamParamSpec, and None otherwise.
Sourcepub fn as_mut_type_param_param_spec(
&mut self,
) -> Option<&mut &'a TypeParamParamSpec>
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.
Sourcepub fn expect_type_param_param_spec(self) -> &'a TypeParamParamSpecwhere
AnyNodeRef<'a>: Debug,
pub fn expect_type_param_param_spec(self) -> &'a TypeParamParamSpecwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of TypeParamParamSpec.
§Panics
Panics if the value is not TypeParamParamSpec, with a panic message including the content of self.
Sourcepub fn type_param_param_spec(self) -> Option<&'a TypeParamParamSpec>
pub fn type_param_param_spec(self) -> Option<&'a TypeParamParamSpec>
Returns Some if self is of variant TypeParamParamSpec, and None otherwise.
Sourcepub const fn is_interpolated_string_format_spec(&self) -> bool
pub const fn is_interpolated_string_format_spec(&self) -> bool
Returns true if self is of variant InterpolatedStringFormatSpec.
Sourcepub fn as_interpolated_string_format_spec(
&self,
) -> Option<&&'a InterpolatedStringFormatSpec>
pub fn as_interpolated_string_format_spec( &self, ) -> Option<&&'a InterpolatedStringFormatSpec>
Returns Some if self is a reference of variant InterpolatedStringFormatSpec, and None otherwise.
Sourcepub fn as_mut_interpolated_string_format_spec(
&mut self,
) -> Option<&mut &'a InterpolatedStringFormatSpec>
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.
Sourcepub fn expect_interpolated_string_format_spec(
self,
) -> &'a InterpolatedStringFormatSpecwhere
AnyNodeRef<'a>: Debug,
pub fn expect_interpolated_string_format_spec(
self,
) -> &'a InterpolatedStringFormatSpecwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of InterpolatedStringFormatSpec.
§Panics
Panics if the value is not InterpolatedStringFormatSpec, with a panic message including the content of self.
Sourcepub fn interpolated_string_format_spec(
self,
) -> Option<&'a InterpolatedStringFormatSpec>
pub fn interpolated_string_format_spec( self, ) -> Option<&'a InterpolatedStringFormatSpec>
Returns Some if self is of variant InterpolatedStringFormatSpec, and None otherwise.
Sourcepub const fn is_pattern_arguments(&self) -> bool
pub const fn is_pattern_arguments(&self) -> bool
Returns true if self is of variant PatternArguments.
Sourcepub fn as_pattern_arguments(&self) -> Option<&&'a PatternArguments>
pub fn as_pattern_arguments(&self) -> Option<&&'a PatternArguments>
Returns Some if self is a reference of variant PatternArguments, and None otherwise.
Sourcepub fn as_mut_pattern_arguments(&mut self) -> Option<&mut &'a PatternArguments>
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.
Sourcepub fn expect_pattern_arguments(self) -> &'a PatternArgumentswhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_arguments(self) -> &'a PatternArgumentswhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternArguments.
§Panics
Panics if the value is not PatternArguments, with a panic message including the content of self.
Sourcepub fn pattern_arguments(self) -> Option<&'a PatternArguments>
pub fn pattern_arguments(self) -> Option<&'a PatternArguments>
Returns Some if self is of variant PatternArguments, and None otherwise.
Sourcepub const fn is_pattern_keyword(&self) -> bool
pub const fn is_pattern_keyword(&self) -> bool
Returns true if self is of variant PatternKeyword.
Sourcepub fn as_pattern_keyword(&self) -> Option<&&'a PatternKeyword>
pub fn as_pattern_keyword(&self) -> Option<&&'a PatternKeyword>
Returns Some if self is a reference of variant PatternKeyword, and None otherwise.
Sourcepub fn as_mut_pattern_keyword(&mut self) -> Option<&mut &'a PatternKeyword>
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.
Sourcepub fn expect_pattern_keyword(self) -> &'a PatternKeywordwhere
AnyNodeRef<'a>: Debug,
pub fn expect_pattern_keyword(self) -> &'a PatternKeywordwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of PatternKeyword.
§Panics
Panics if the value is not PatternKeyword, with a panic message including the content of self.
Sourcepub fn pattern_keyword(self) -> Option<&'a PatternKeyword>
pub fn pattern_keyword(self) -> Option<&'a PatternKeyword>
Returns Some if self is of variant PatternKeyword, and None otherwise.
Sourcepub const fn is_comprehension(&self) -> bool
pub const fn is_comprehension(&self) -> bool
Returns true if self is of variant Comprehension.
Sourcepub fn as_comprehension(&self) -> Option<&&'a Comprehension>
pub fn as_comprehension(&self) -> Option<&&'a Comprehension>
Returns Some if self is a reference of variant Comprehension, and None otherwise.
Sourcepub fn as_mut_comprehension(&mut self) -> Option<&mut &'a Comprehension>
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.
Sourcepub fn expect_comprehension(self) -> &'a Comprehensionwhere
AnyNodeRef<'a>: Debug,
pub fn expect_comprehension(self) -> &'a Comprehensionwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of Comprehension.
§Panics
Panics if the value is not Comprehension, with a panic message including the content of self.
Sourcepub fn comprehension(self) -> Option<&'a Comprehension>
pub fn comprehension(self) -> Option<&'a Comprehension>
Returns Some if self is of variant Comprehension, and None otherwise.
Sourcepub const fn is_arguments(&self) -> bool
pub const fn is_arguments(&self) -> bool
Returns true if self is of variant Arguments.
Sourcepub fn as_arguments(&self) -> Option<&&'a Arguments>
pub fn as_arguments(&self) -> Option<&&'a Arguments>
Returns Some if self is a reference of variant Arguments, and None otherwise.
Sourcepub fn as_mut_arguments(&mut self) -> Option<&mut &'a Arguments>
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.
Sourcepub fn expect_arguments(self) -> &'a Argumentswhere
AnyNodeRef<'a>: Debug,
pub fn expect_arguments(self) -> &'a Argumentswhere
AnyNodeRef<'a>: Debug,
Sourcepub fn arguments(self) -> Option<&'a Arguments>
pub fn arguments(self) -> Option<&'a Arguments>
Returns Some if self is of variant Arguments, and None otherwise.
Sourcepub const fn is_parameters(&self) -> bool
pub const fn is_parameters(&self) -> bool
Returns true if self is of variant Parameters.
Sourcepub fn as_parameters(&self) -> Option<&&'a Parameters>
pub fn as_parameters(&self) -> Option<&&'a Parameters>
Returns Some if self is a reference of variant Parameters, and None otherwise.
Sourcepub fn as_mut_parameters(&mut self) -> Option<&mut &'a Parameters>
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.
Sourcepub fn expect_parameters(self) -> &'a Parameterswhere
AnyNodeRef<'a>: Debug,
pub fn expect_parameters(self) -> &'a Parameterswhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of Parameters.
§Panics
Panics if the value is not Parameters, with a panic message including the content of self.
Sourcepub fn parameters(self) -> Option<&'a Parameters>
pub fn parameters(self) -> Option<&'a Parameters>
Returns Some if self is of variant Parameters, and None otherwise.
Sourcepub const fn is_parameter(&self) -> bool
pub const fn is_parameter(&self) -> bool
Returns true if self is of variant Parameter.
Sourcepub fn as_parameter(&self) -> Option<&&'a Parameter>
pub fn as_parameter(&self) -> Option<&&'a Parameter>
Returns Some if self is a reference of variant Parameter, and None otherwise.
Sourcepub fn as_mut_parameter(&mut self) -> Option<&mut &'a Parameter>
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.
Sourcepub fn expect_parameter(self) -> &'a Parameterwhere
AnyNodeRef<'a>: Debug,
pub fn expect_parameter(self) -> &'a Parameterwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn parameter(self) -> Option<&'a Parameter>
pub fn parameter(self) -> Option<&'a Parameter>
Returns Some if self is of variant Parameter, and None otherwise.
Sourcepub const fn is_parameter_with_default(&self) -> bool
pub const fn is_parameter_with_default(&self) -> bool
Returns true if self is of variant ParameterWithDefault.
Sourcepub fn as_parameter_with_default(&self) -> Option<&&'a ParameterWithDefault>
pub fn as_parameter_with_default(&self) -> Option<&&'a ParameterWithDefault>
Returns Some if self is a reference of variant ParameterWithDefault, and None otherwise.
Sourcepub fn as_mut_parameter_with_default(
&mut self,
) -> Option<&mut &'a ParameterWithDefault>
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.
Sourcepub fn expect_parameter_with_default(self) -> &'a ParameterWithDefaultwhere
AnyNodeRef<'a>: Debug,
pub fn expect_parameter_with_default(self) -> &'a ParameterWithDefaultwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ParameterWithDefault.
§Panics
Panics if the value is not ParameterWithDefault, with a panic message including the content of self.
Sourcepub fn parameter_with_default(self) -> Option<&'a ParameterWithDefault>
pub fn parameter_with_default(self) -> Option<&'a ParameterWithDefault>
Returns Some if self is of variant ParameterWithDefault, and None otherwise.
Sourcepub const fn is_keyword(&self) -> bool
pub const fn is_keyword(&self) -> bool
Returns true if self is of variant Keyword.
Sourcepub fn as_keyword(&self) -> Option<&&'a Keyword>
pub fn as_keyword(&self) -> Option<&&'a Keyword>
Returns Some if self is a reference of variant Keyword, and None otherwise.
Sourcepub fn as_mut_keyword(&mut self) -> Option<&mut &'a Keyword>
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.
Sourcepub fn expect_keyword(self) -> &'a Keywordwhere
AnyNodeRef<'a>: Debug,
pub fn expect_keyword(self) -> &'a Keywordwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn keyword(self) -> Option<&'a Keyword>
pub fn keyword(self) -> Option<&'a Keyword>
Returns Some if self is of variant Keyword, and None otherwise.
Sourcepub fn as_alias(&self) -> Option<&&'a Alias>
pub fn as_alias(&self) -> Option<&&'a Alias>
Returns Some if self is a reference of variant Alias, and None otherwise.
Sourcepub fn as_mut_alias(&mut self) -> Option<&mut &'a Alias>
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.
Sourcepub fn expect_alias(self) -> &'a Aliaswhere
AnyNodeRef<'a>: Debug,
pub fn expect_alias(self) -> &'a Aliaswhere
AnyNodeRef<'a>: Debug,
Sourcepub fn alias(self) -> Option<&'a Alias>
pub fn alias(self) -> Option<&'a Alias>
Returns Some if self is of variant Alias, and None otherwise.
Sourcepub const fn is_with_item(&self) -> bool
pub const fn is_with_item(&self) -> bool
Returns true if self is of variant WithItem.
Sourcepub fn as_with_item(&self) -> Option<&&'a WithItem>
pub fn as_with_item(&self) -> Option<&&'a WithItem>
Returns Some if self is a reference of variant WithItem, and None otherwise.
Sourcepub fn as_mut_with_item(&mut self) -> Option<&mut &'a WithItem>
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.
Sourcepub fn expect_with_item(self) -> &'a WithItemwhere
AnyNodeRef<'a>: Debug,
pub fn expect_with_item(self) -> &'a WithItemwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn with_item(self) -> Option<&'a WithItem>
pub fn with_item(self) -> Option<&'a WithItem>
Returns Some if self is of variant WithItem, and None otherwise.
Sourcepub const fn is_match_case(&self) -> bool
pub const fn is_match_case(&self) -> bool
Returns true if self is of variant MatchCase.
Sourcepub fn as_match_case(&self) -> Option<&&'a MatchCase>
pub fn as_match_case(&self) -> Option<&&'a MatchCase>
Returns Some if self is a reference of variant MatchCase, and None otherwise.
Sourcepub fn as_mut_match_case(&mut self) -> Option<&mut &'a MatchCase>
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.
Sourcepub fn expect_match_case(self) -> &'a MatchCasewhere
AnyNodeRef<'a>: Debug,
pub fn expect_match_case(self) -> &'a MatchCasewhere
AnyNodeRef<'a>: Debug,
Sourcepub fn match_case(self) -> Option<&'a MatchCase>
pub fn match_case(self) -> Option<&'a MatchCase>
Returns Some if self is of variant MatchCase, and None otherwise.
Sourcepub const fn is_decorator(&self) -> bool
pub const fn is_decorator(&self) -> bool
Returns true if self is of variant Decorator.
Sourcepub fn as_decorator(&self) -> Option<&&'a Decorator>
pub fn as_decorator(&self) -> Option<&&'a Decorator>
Returns Some if self is a reference of variant Decorator, and None otherwise.
Sourcepub fn as_mut_decorator(&mut self) -> Option<&mut &'a Decorator>
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.
Sourcepub fn expect_decorator(self) -> &'a Decoratorwhere
AnyNodeRef<'a>: Debug,
pub fn expect_decorator(self) -> &'a Decoratorwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn decorator(self) -> Option<&'a Decorator>
pub fn decorator(self) -> Option<&'a Decorator>
Returns Some if self is of variant Decorator, and None otherwise.
Sourcepub const fn is_elif_else_clause(&self) -> bool
pub const fn is_elif_else_clause(&self) -> bool
Returns true if self is of variant ElifElseClause.
Sourcepub fn as_elif_else_clause(&self) -> Option<&&'a ElifElseClause>
pub fn as_elif_else_clause(&self) -> Option<&&'a ElifElseClause>
Returns Some if self is a reference of variant ElifElseClause, and None otherwise.
Sourcepub fn as_mut_elif_else_clause(&mut self) -> Option<&mut &'a ElifElseClause>
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.
Sourcepub fn expect_elif_else_clause(self) -> &'a ElifElseClausewhere
AnyNodeRef<'a>: Debug,
pub fn expect_elif_else_clause(self) -> &'a ElifElseClausewhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of ElifElseClause.
§Panics
Panics if the value is not ElifElseClause, with a panic message including the content of self.
Sourcepub fn elif_else_clause(self) -> Option<&'a ElifElseClause>
pub fn elif_else_clause(self) -> Option<&'a ElifElseClause>
Returns Some if self is of variant ElifElseClause, and None otherwise.
Sourcepub const fn is_type_params(&self) -> bool
pub const fn is_type_params(&self) -> bool
Returns true if self is of variant TypeParams.
Sourcepub fn as_type_params(&self) -> Option<&&'a TypeParams>
pub fn as_type_params(&self) -> Option<&&'a TypeParams>
Returns Some if self is a reference of variant TypeParams, and None otherwise.
Sourcepub fn as_mut_type_params(&mut self) -> Option<&mut &'a TypeParams>
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.
Sourcepub fn expect_type_params(self) -> &'a TypeParamswhere
AnyNodeRef<'a>: Debug,
pub fn expect_type_params(self) -> &'a TypeParamswhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of TypeParams.
§Panics
Panics if the value is not TypeParams, with a panic message including the content of self.
Sourcepub fn type_params(self) -> Option<&'a TypeParams>
pub fn type_params(self) -> Option<&'a TypeParams>
Returns Some if self is of variant TypeParams, and None otherwise.
Sourcepub const fn is_f_string(&self) -> bool
pub const fn is_f_string(&self) -> bool
Returns true if self is of variant FString.
Sourcepub fn as_f_string(&self) -> Option<&&'a FString>
pub fn as_f_string(&self) -> Option<&&'a FString>
Returns Some if self is a reference of variant FString, and None otherwise.
Sourcepub fn as_mut_f_string(&mut self) -> Option<&mut &'a FString>
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.
Sourcepub fn expect_f_string(self) -> &'a FStringwhere
AnyNodeRef<'a>: Debug,
pub fn expect_f_string(self) -> &'a FStringwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn f_string(self) -> Option<&'a FString>
pub fn f_string(self) -> Option<&'a FString>
Returns Some if self is of variant FString, and None otherwise.
Sourcepub const fn is_t_string(&self) -> bool
pub const fn is_t_string(&self) -> bool
Returns true if self is of variant TString.
Sourcepub fn as_t_string(&self) -> Option<&&'a TString>
pub fn as_t_string(&self) -> Option<&&'a TString>
Returns Some if self is a reference of variant TString, and None otherwise.
Sourcepub fn as_mut_t_string(&mut self) -> Option<&mut &'a TString>
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.
Sourcepub fn expect_t_string(self) -> &'a TStringwhere
AnyNodeRef<'a>: Debug,
pub fn expect_t_string(self) -> &'a TStringwhere
AnyNodeRef<'a>: Debug,
Sourcepub fn t_string(self) -> Option<&'a TString>
pub fn t_string(self) -> Option<&'a TString>
Returns Some if self is of variant TString, and None otherwise.
Sourcepub const fn is_string_literal(&self) -> bool
pub const fn is_string_literal(&self) -> bool
Returns true if self is of variant StringLiteral.
Sourcepub fn as_string_literal(&self) -> Option<&&'a StringLiteral>
pub fn as_string_literal(&self) -> Option<&&'a StringLiteral>
Returns Some if self is a reference of variant StringLiteral, and None otherwise.
Sourcepub fn as_mut_string_literal(&mut self) -> Option<&mut &'a StringLiteral>
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.
Sourcepub fn expect_string_literal(self) -> &'a StringLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_string_literal(self) -> &'a StringLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of StringLiteral.
§Panics
Panics if the value is not StringLiteral, with a panic message including the content of self.
Sourcepub fn string_literal(self) -> Option<&'a StringLiteral>
pub fn string_literal(self) -> Option<&'a StringLiteral>
Returns Some if self is of variant StringLiteral, and None otherwise.
Sourcepub const fn is_bytes_literal(&self) -> bool
pub const fn is_bytes_literal(&self) -> bool
Returns true if self is of variant BytesLiteral.
Sourcepub fn as_bytes_literal(&self) -> Option<&&'a BytesLiteral>
pub fn as_bytes_literal(&self) -> Option<&&'a BytesLiteral>
Returns Some if self is a reference of variant BytesLiteral, and None otherwise.
Sourcepub fn as_mut_bytes_literal(&mut self) -> Option<&mut &'a BytesLiteral>
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.
Sourcepub fn expect_bytes_literal(self) -> &'a BytesLiteralwhere
AnyNodeRef<'a>: Debug,
pub fn expect_bytes_literal(self) -> &'a BytesLiteralwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of BytesLiteral.
§Panics
Panics if the value is not BytesLiteral, with a panic message including the content of self.
Sourcepub fn bytes_literal(self) -> Option<&'a BytesLiteral>
pub fn bytes_literal(self) -> Option<&'a BytesLiteral>
Returns Some if self is of variant BytesLiteral, and None otherwise.
Sourcepub const fn is_identifier(&self) -> bool
pub const fn is_identifier(&self) -> bool
Returns true if self is of variant Identifier.
Sourcepub fn as_identifier(&self) -> Option<&&'a Identifier>
pub fn as_identifier(&self) -> Option<&&'a Identifier>
Returns Some if self is a reference of variant Identifier, and None otherwise.
Sourcepub fn as_mut_identifier(&mut self) -> Option<&mut &'a Identifier>
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.
Sourcepub fn expect_identifier(self) -> &'a Identifierwhere
AnyNodeRef<'a>: Debug,
pub fn expect_identifier(self) -> &'a Identifierwhere
AnyNodeRef<'a>: Debug,
Unwraps the value, yielding the content of Identifier.
§Panics
Panics if the value is not Identifier, with a panic message including the content of self.
Sourcepub fn identifier(self) -> Option<&'a Identifier>
pub fn identifier(self) -> Option<&'a Identifier>
Returns Some if self is of variant Identifier, and None otherwise.
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_mod_ref(self) -> Option<ModRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_stmt_ref(self) -> Option<StmtRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_expr_ref(self) -> Option<ExprRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_except_handler_ref(self) -> Option<ExceptHandlerRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_interpolated_string_element_ref( self, ) -> Option<InterpolatedStringElementRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_pattern_ref(self) -> Option<PatternRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn as_type_param_ref(self) -> Option<TypeParamRef<'a>>
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
pub fn visit_source_order<'b, V>(self, visitor: &mut V)where
'a: 'b,
V: SourceOrderVisitor<'b> + ?Sized,
Source§impl AnyNodeRef<'_>
impl AnyNodeRef<'_>
pub const fn is_statement(self) -> bool
Source§impl AnyNodeRef<'_>
impl AnyNodeRef<'_>
pub const fn is_expression(self) -> bool
Source§impl AnyNodeRef<'_>
impl AnyNodeRef<'_>
pub const fn is_except_handler(self) -> bool
Source§impl AnyNodeRef<'_>
impl AnyNodeRef<'_>
pub const fn is_interpolated_string_element(self) -> bool
Source§impl AnyNodeRef<'_>
impl AnyNodeRef<'_>
pub const fn is_pattern(self) -> bool
Source§impl AnyNodeRef<'_>
impl AnyNodeRef<'_>
pub const fn is_type_param(self) -> bool
Source§impl<'a> AnyNodeRef<'a>
impl<'a> AnyNodeRef<'a>
Sourcepub fn ptr_eq(self, other: AnyNodeRef<'_>) -> bool
pub fn ptr_eq(self, other: AnyNodeRef<'_>) -> bool
Compares two any node refs by their pointers (referential equality).
Sourcepub const fn is_alternative_branch_with_node(self) -> bool
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.
Sourcepub fn last_child_in_body(&self) -> Option<AnyNodeRef<'a>>
pub fn last_child_in_body(&self) -> Option<AnyNodeRef<'a>>
The last child of the last branch, if the node has multiple branches.
Sourcepub fn is_first_statement_in_body(&self, body: AnyNodeRef<'_>) -> bool
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)
fSourcepub fn is_first_statement_in_alternate_body(&self, body: AnyNodeRef<'_>) -> bool
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>
impl<'a> Clone for AnyNodeRef<'a>
Source§fn clone(&self) -> AnyNodeRef<'a>
fn clone(&self) -> AnyNodeRef<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for AnyNodeRef<'a>
impl<'a> Debug for AnyNodeRef<'a>
Source§impl<'a> From<&'a Alias> for AnyNodeRef<'a>
impl<'a> From<&'a Alias> for AnyNodeRef<'a>
Source§fn from(node: &'a Alias) -> AnyNodeRef<'a>
fn from(node: &'a Alias) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Arguments> for AnyNodeRef<'a>
impl<'a> From<&'a Arguments> for AnyNodeRef<'a>
Source§fn from(node: &'a Arguments) -> AnyNodeRef<'a>
fn from(node: &'a Arguments) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a BytesLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a BytesLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a BytesLiteral) -> AnyNodeRef<'a>
fn from(node: &'a BytesLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Comprehension> for AnyNodeRef<'a>
impl<'a> From<&'a Comprehension> for AnyNodeRef<'a>
Source§fn from(node: &'a Comprehension) -> AnyNodeRef<'a>
fn from(node: &'a Comprehension) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Decorator> for AnyNodeRef<'a>
impl<'a> From<&'a Decorator> for AnyNodeRef<'a>
Source§fn from(node: &'a Decorator) -> AnyNodeRef<'a>
fn from(node: &'a Decorator) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ElifElseClause> for AnyNodeRef<'a>
impl<'a> From<&'a ElifElseClause> for AnyNodeRef<'a>
Source§fn from(node: &'a ElifElseClause) -> AnyNodeRef<'a>
fn from(node: &'a ElifElseClause) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExceptHandler> for AnyNodeRef<'a>
impl<'a> From<&'a ExceptHandler> for AnyNodeRef<'a>
Source§fn from(node: &'a ExceptHandler) -> AnyNodeRef<'a>
fn from(node: &'a ExceptHandler) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExceptHandlerExceptHandler> for AnyNodeRef<'a>
impl<'a> From<&'a ExceptHandlerExceptHandler> for AnyNodeRef<'a>
Source§fn from(node: &'a ExceptHandlerExceptHandler) -> AnyNodeRef<'a>
fn from(node: &'a ExceptHandlerExceptHandler) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Expr> for AnyNodeRef<'a>
impl<'a> From<&'a Expr> for AnyNodeRef<'a>
Source§fn from(node: &'a Expr) -> AnyNodeRef<'a>
fn from(node: &'a Expr) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprAttribute> for AnyNodeRef<'a>
impl<'a> From<&'a ExprAttribute> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprAttribute) -> AnyNodeRef<'a>
fn from(node: &'a ExprAttribute) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprAwait> for AnyNodeRef<'a>
impl<'a> From<&'a ExprAwait> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprAwait) -> AnyNodeRef<'a>
fn from(node: &'a ExprAwait) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprBinOp> for AnyNodeRef<'a>
impl<'a> From<&'a ExprBinOp> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprBinOp) -> AnyNodeRef<'a>
fn from(node: &'a ExprBinOp) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprBoolOp> for AnyNodeRef<'a>
impl<'a> From<&'a ExprBoolOp> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprBoolOp) -> AnyNodeRef<'a>
fn from(node: &'a ExprBoolOp) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprBooleanLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a ExprBooleanLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprBooleanLiteral) -> AnyNodeRef<'a>
fn from(node: &'a ExprBooleanLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprBytesLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a ExprBytesLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprBytesLiteral) -> AnyNodeRef<'a>
fn from(node: &'a ExprBytesLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprCall> for AnyNodeRef<'a>
impl<'a> From<&'a ExprCall> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprCall) -> AnyNodeRef<'a>
fn from(node: &'a ExprCall) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprCompare> for AnyNodeRef<'a>
impl<'a> From<&'a ExprCompare> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprCompare) -> AnyNodeRef<'a>
fn from(node: &'a ExprCompare) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprDict> for AnyNodeRef<'a>
impl<'a> From<&'a ExprDict> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprDict) -> AnyNodeRef<'a>
fn from(node: &'a ExprDict) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprDictComp> for AnyNodeRef<'a>
impl<'a> From<&'a ExprDictComp> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprDictComp) -> AnyNodeRef<'a>
fn from(node: &'a ExprDictComp) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprEllipsisLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a ExprEllipsisLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprEllipsisLiteral) -> AnyNodeRef<'a>
fn from(node: &'a ExprEllipsisLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprFString> for AnyNodeRef<'a>
impl<'a> From<&'a ExprFString> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprFString) -> AnyNodeRef<'a>
fn from(node: &'a ExprFString) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprGenerator> for AnyNodeRef<'a>
impl<'a> From<&'a ExprGenerator> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprGenerator) -> AnyNodeRef<'a>
fn from(node: &'a ExprGenerator) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprIf> for AnyNodeRef<'a>
impl<'a> From<&'a ExprIf> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprIf) -> AnyNodeRef<'a>
fn from(node: &'a ExprIf) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprIpyEscapeCommand> for AnyNodeRef<'a>
impl<'a> From<&'a ExprIpyEscapeCommand> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprIpyEscapeCommand) -> AnyNodeRef<'a>
fn from(node: &'a ExprIpyEscapeCommand) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprLambda> for AnyNodeRef<'a>
impl<'a> From<&'a ExprLambda> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprLambda) -> AnyNodeRef<'a>
fn from(node: &'a ExprLambda) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprList> for AnyNodeRef<'a>
impl<'a> From<&'a ExprList> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprList) -> AnyNodeRef<'a>
fn from(node: &'a ExprList) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprListComp> for AnyNodeRef<'a>
impl<'a> From<&'a ExprListComp> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprListComp) -> AnyNodeRef<'a>
fn from(node: &'a ExprListComp) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprName> for AnyNodeRef<'a>
impl<'a> From<&'a ExprName> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprName) -> AnyNodeRef<'a>
fn from(node: &'a ExprName) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprNamed> for AnyNodeRef<'a>
impl<'a> From<&'a ExprNamed> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprNamed) -> AnyNodeRef<'a>
fn from(node: &'a ExprNamed) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprNoneLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a ExprNoneLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprNoneLiteral) -> AnyNodeRef<'a>
fn from(node: &'a ExprNoneLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprNumberLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a ExprNumberLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprNumberLiteral) -> AnyNodeRef<'a>
fn from(node: &'a ExprNumberLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprSet> for AnyNodeRef<'a>
impl<'a> From<&'a ExprSet> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprSet) -> AnyNodeRef<'a>
fn from(node: &'a ExprSet) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprSetComp> for AnyNodeRef<'a>
impl<'a> From<&'a ExprSetComp> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprSetComp) -> AnyNodeRef<'a>
fn from(node: &'a ExprSetComp) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprSlice> for AnyNodeRef<'a>
impl<'a> From<&'a ExprSlice> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprSlice) -> AnyNodeRef<'a>
fn from(node: &'a ExprSlice) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprStarred> for AnyNodeRef<'a>
impl<'a> From<&'a ExprStarred> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprStarred) -> AnyNodeRef<'a>
fn from(node: &'a ExprStarred) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprStringLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a ExprStringLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprStringLiteral) -> AnyNodeRef<'a>
fn from(node: &'a ExprStringLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprSubscript> for AnyNodeRef<'a>
impl<'a> From<&'a ExprSubscript> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprSubscript) -> AnyNodeRef<'a>
fn from(node: &'a ExprSubscript) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprTString> for AnyNodeRef<'a>
impl<'a> From<&'a ExprTString> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprTString) -> AnyNodeRef<'a>
fn from(node: &'a ExprTString) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprTuple> for AnyNodeRef<'a>
impl<'a> From<&'a ExprTuple> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprTuple) -> AnyNodeRef<'a>
fn from(node: &'a ExprTuple) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprUnaryOp> for AnyNodeRef<'a>
impl<'a> From<&'a ExprUnaryOp> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprUnaryOp) -> AnyNodeRef<'a>
fn from(node: &'a ExprUnaryOp) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprYield> for AnyNodeRef<'a>
impl<'a> From<&'a ExprYield> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprYield) -> AnyNodeRef<'a>
fn from(node: &'a ExprYield) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ExprYieldFrom> for AnyNodeRef<'a>
impl<'a> From<&'a ExprYieldFrom> for AnyNodeRef<'a>
Source§fn from(node: &'a ExprYieldFrom) -> AnyNodeRef<'a>
fn from(node: &'a ExprYieldFrom) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a FString> for AnyNodeRef<'a>
impl<'a> From<&'a FString> for AnyNodeRef<'a>
Source§fn from(node: &'a FString) -> AnyNodeRef<'a>
fn from(node: &'a FString) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Identifier> for AnyNodeRef<'a>
impl<'a> From<&'a Identifier> for AnyNodeRef<'a>
Source§fn from(node: &'a Identifier) -> AnyNodeRef<'a>
fn from(node: &'a Identifier) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a InterpolatedElement> for AnyNodeRef<'a>
impl<'a> From<&'a InterpolatedElement> for AnyNodeRef<'a>
Source§fn from(node: &'a InterpolatedElement) -> AnyNodeRef<'a>
fn from(node: &'a InterpolatedElement) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a InterpolatedStringElement> for AnyNodeRef<'a>
impl<'a> From<&'a InterpolatedStringElement> for AnyNodeRef<'a>
Source§fn from(node: &'a InterpolatedStringElement) -> AnyNodeRef<'a>
fn from(node: &'a InterpolatedStringElement) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a InterpolatedStringFormatSpec> for AnyNodeRef<'a>
impl<'a> From<&'a InterpolatedStringFormatSpec> for AnyNodeRef<'a>
Source§fn from(node: &'a InterpolatedStringFormatSpec) -> AnyNodeRef<'a>
fn from(node: &'a InterpolatedStringFormatSpec) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a InterpolatedStringLiteralElement> for AnyNodeRef<'a>
impl<'a> From<&'a InterpolatedStringLiteralElement> for AnyNodeRef<'a>
Source§fn from(node: &'a InterpolatedStringLiteralElement) -> AnyNodeRef<'a>
fn from(node: &'a InterpolatedStringLiteralElement) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Keyword> for AnyNodeRef<'a>
impl<'a> From<&'a Keyword> for AnyNodeRef<'a>
Source§fn from(node: &'a Keyword) -> AnyNodeRef<'a>
fn from(node: &'a Keyword) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a MatchCase> for AnyNodeRef<'a>
impl<'a> From<&'a MatchCase> for AnyNodeRef<'a>
Source§fn from(node: &'a MatchCase) -> AnyNodeRef<'a>
fn from(node: &'a MatchCase) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Mod> for AnyNodeRef<'a>
impl<'a> From<&'a Mod> for AnyNodeRef<'a>
Source§fn from(node: &'a Mod) -> AnyNodeRef<'a>
fn from(node: &'a Mod) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ModExpression> for AnyNodeRef<'a>
impl<'a> From<&'a ModExpression> for AnyNodeRef<'a>
Source§fn from(node: &'a ModExpression) -> AnyNodeRef<'a>
fn from(node: &'a ModExpression) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ModModule> for AnyNodeRef<'a>
impl<'a> From<&'a ModModule> for AnyNodeRef<'a>
Source§fn from(node: &'a ModModule) -> AnyNodeRef<'a>
fn from(node: &'a ModModule) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Parameter> for AnyNodeRef<'a>
impl<'a> From<&'a Parameter> for AnyNodeRef<'a>
Source§fn from(node: &'a Parameter) -> AnyNodeRef<'a>
fn from(node: &'a Parameter) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a ParameterWithDefault> for AnyNodeRef<'a>
impl<'a> From<&'a ParameterWithDefault> for AnyNodeRef<'a>
Source§fn from(node: &'a ParameterWithDefault) -> AnyNodeRef<'a>
fn from(node: &'a ParameterWithDefault) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Parameters> for AnyNodeRef<'a>
impl<'a> From<&'a Parameters> for AnyNodeRef<'a>
Source§fn from(node: &'a Parameters) -> AnyNodeRef<'a>
fn from(node: &'a Parameters) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Pattern> for AnyNodeRef<'a>
impl<'a> From<&'a Pattern> for AnyNodeRef<'a>
Source§fn from(node: &'a Pattern) -> AnyNodeRef<'a>
fn from(node: &'a Pattern) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternArguments> for AnyNodeRef<'a>
impl<'a> From<&'a PatternArguments> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternArguments) -> AnyNodeRef<'a>
fn from(node: &'a PatternArguments) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternKeyword> for AnyNodeRef<'a>
impl<'a> From<&'a PatternKeyword> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternKeyword) -> AnyNodeRef<'a>
fn from(node: &'a PatternKeyword) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchAs> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchAs> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchAs) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchAs) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchClass> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchClass> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchClass) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchClass) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchMapping> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchMapping> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchMapping) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchMapping) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchOr> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchOr> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchOr) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchOr) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchSequence> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchSequence> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchSequence) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchSequence) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchSingleton> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchSingleton> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchSingleton) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchSingleton) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchStar> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchStar> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchStar) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchStar) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a PatternMatchValue> for AnyNodeRef<'a>
impl<'a> From<&'a PatternMatchValue> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternMatchValue) -> AnyNodeRef<'a>
fn from(node: &'a PatternMatchValue) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a Stmt> for AnyNodeRef<'a>
impl<'a> From<&'a Stmt> for AnyNodeRef<'a>
Source§fn from(node: &'a Stmt) -> AnyNodeRef<'a>
fn from(node: &'a Stmt) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtAnnAssign> for AnyNodeRef<'a>
impl<'a> From<&'a StmtAnnAssign> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtAnnAssign) -> AnyNodeRef<'a>
fn from(node: &'a StmtAnnAssign) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtAssert> for AnyNodeRef<'a>
impl<'a> From<&'a StmtAssert> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtAssert) -> AnyNodeRef<'a>
fn from(node: &'a StmtAssert) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtAssign> for AnyNodeRef<'a>
impl<'a> From<&'a StmtAssign> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtAssign) -> AnyNodeRef<'a>
fn from(node: &'a StmtAssign) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtAugAssign> for AnyNodeRef<'a>
impl<'a> From<&'a StmtAugAssign> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtAugAssign) -> AnyNodeRef<'a>
fn from(node: &'a StmtAugAssign) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtBreak> for AnyNodeRef<'a>
impl<'a> From<&'a StmtBreak> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtBreak) -> AnyNodeRef<'a>
fn from(node: &'a StmtBreak) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtClassDef> for AnyNodeRef<'a>
impl<'a> From<&'a StmtClassDef> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtClassDef) -> AnyNodeRef<'a>
fn from(node: &'a StmtClassDef) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtContinue> for AnyNodeRef<'a>
impl<'a> From<&'a StmtContinue> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtContinue) -> AnyNodeRef<'a>
fn from(node: &'a StmtContinue) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtDelete> for AnyNodeRef<'a>
impl<'a> From<&'a StmtDelete> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtDelete) -> AnyNodeRef<'a>
fn from(node: &'a StmtDelete) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtExpr> for AnyNodeRef<'a>
impl<'a> From<&'a StmtExpr> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtExpr) -> AnyNodeRef<'a>
fn from(node: &'a StmtExpr) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtFor> for AnyNodeRef<'a>
impl<'a> From<&'a StmtFor> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtFor) -> AnyNodeRef<'a>
fn from(node: &'a StmtFor) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtFunctionDef> for AnyNodeRef<'a>
impl<'a> From<&'a StmtFunctionDef> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtFunctionDef) -> AnyNodeRef<'a>
fn from(node: &'a StmtFunctionDef) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtGlobal> for AnyNodeRef<'a>
impl<'a> From<&'a StmtGlobal> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtGlobal) -> AnyNodeRef<'a>
fn from(node: &'a StmtGlobal) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtIf> for AnyNodeRef<'a>
impl<'a> From<&'a StmtIf> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtIf) -> AnyNodeRef<'a>
fn from(node: &'a StmtIf) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtImport> for AnyNodeRef<'a>
impl<'a> From<&'a StmtImport> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtImport) -> AnyNodeRef<'a>
fn from(node: &'a StmtImport) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtImportFrom> for AnyNodeRef<'a>
impl<'a> From<&'a StmtImportFrom> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtImportFrom) -> AnyNodeRef<'a>
fn from(node: &'a StmtImportFrom) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtIpyEscapeCommand> for AnyNodeRef<'a>
impl<'a> From<&'a StmtIpyEscapeCommand> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtIpyEscapeCommand) -> AnyNodeRef<'a>
fn from(node: &'a StmtIpyEscapeCommand) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtMatch> for AnyNodeRef<'a>
impl<'a> From<&'a StmtMatch> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtMatch) -> AnyNodeRef<'a>
fn from(node: &'a StmtMatch) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtNonlocal> for AnyNodeRef<'a>
impl<'a> From<&'a StmtNonlocal> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtNonlocal) -> AnyNodeRef<'a>
fn from(node: &'a StmtNonlocal) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtPass> for AnyNodeRef<'a>
impl<'a> From<&'a StmtPass> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtPass) -> AnyNodeRef<'a>
fn from(node: &'a StmtPass) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtRaise> for AnyNodeRef<'a>
impl<'a> From<&'a StmtRaise> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtRaise) -> AnyNodeRef<'a>
fn from(node: &'a StmtRaise) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtReturn> for AnyNodeRef<'a>
impl<'a> From<&'a StmtReturn> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtReturn) -> AnyNodeRef<'a>
fn from(node: &'a StmtReturn) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtTry> for AnyNodeRef<'a>
impl<'a> From<&'a StmtTry> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtTry) -> AnyNodeRef<'a>
fn from(node: &'a StmtTry) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtTypeAlias> for AnyNodeRef<'a>
impl<'a> From<&'a StmtTypeAlias> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtTypeAlias) -> AnyNodeRef<'a>
fn from(node: &'a StmtTypeAlias) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtWhile> for AnyNodeRef<'a>
impl<'a> From<&'a StmtWhile> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtWhile) -> AnyNodeRef<'a>
fn from(node: &'a StmtWhile) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StmtWith> for AnyNodeRef<'a>
impl<'a> From<&'a StmtWith> for AnyNodeRef<'a>
Source§fn from(node: &'a StmtWith) -> AnyNodeRef<'a>
fn from(node: &'a StmtWith) -> AnyNodeRef<'a>
Source§impl<'a> From<&StringLike<'a>> for AnyNodeRef<'a>
impl<'a> From<&StringLike<'a>> for AnyNodeRef<'a>
Source§fn from(value: &StringLike<'a>) -> AnyNodeRef<'a>
fn from(value: &StringLike<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<&StringLikePart<'a>> for AnyNodeRef<'a>
impl<'a> From<&StringLikePart<'a>> for AnyNodeRef<'a>
Source§fn from(value: &StringLikePart<'a>) -> AnyNodeRef<'a>
fn from(value: &StringLikePart<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a StringLiteral> for AnyNodeRef<'a>
impl<'a> From<&'a StringLiteral> for AnyNodeRef<'a>
Source§fn from(node: &'a StringLiteral) -> AnyNodeRef<'a>
fn from(node: &'a StringLiteral) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a TString> for AnyNodeRef<'a>
impl<'a> From<&'a TString> for AnyNodeRef<'a>
Source§fn from(node: &'a TString) -> AnyNodeRef<'a>
fn from(node: &'a TString) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a TypeParam> for AnyNodeRef<'a>
impl<'a> From<&'a TypeParam> for AnyNodeRef<'a>
Source§fn from(node: &'a TypeParam) -> AnyNodeRef<'a>
fn from(node: &'a TypeParam) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a TypeParamParamSpec> for AnyNodeRef<'a>
impl<'a> From<&'a TypeParamParamSpec> for AnyNodeRef<'a>
Source§fn from(node: &'a TypeParamParamSpec) -> AnyNodeRef<'a>
fn from(node: &'a TypeParamParamSpec) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a TypeParamTypeVar> for AnyNodeRef<'a>
impl<'a> From<&'a TypeParamTypeVar> for AnyNodeRef<'a>
Source§fn from(node: &'a TypeParamTypeVar) -> AnyNodeRef<'a>
fn from(node: &'a TypeParamTypeVar) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a TypeParamTypeVarTuple> for AnyNodeRef<'a>
impl<'a> From<&'a TypeParamTypeVarTuple> for AnyNodeRef<'a>
Source§fn from(node: &'a TypeParamTypeVarTuple) -> AnyNodeRef<'a>
fn from(node: &'a TypeParamTypeVarTuple) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a TypeParams> for AnyNodeRef<'a>
impl<'a> From<&'a TypeParams> for AnyNodeRef<'a>
Source§fn from(node: &'a TypeParams) -> AnyNodeRef<'a>
fn from(node: &'a TypeParams) -> AnyNodeRef<'a>
Source§impl<'a> From<&'a WithItem> for AnyNodeRef<'a>
impl<'a> From<&'a WithItem> for AnyNodeRef<'a>
Source§fn from(node: &'a WithItem) -> AnyNodeRef<'a>
fn from(node: &'a WithItem) -> AnyNodeRef<'a>
Source§impl<'a> From<ExceptHandlerRef<'a>> for AnyNodeRef<'a>
impl<'a> From<ExceptHandlerRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: ExceptHandlerRef<'a>) -> AnyNodeRef<'a>
fn from(node: ExceptHandlerRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<ExprRef<'a>> for AnyNodeRef<'a>
impl<'a> From<ExprRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: ExprRef<'a>) -> AnyNodeRef<'a>
fn from(node: ExprRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<InterpolatedStringElementRef<'a>> for AnyNodeRef<'a>
impl<'a> From<InterpolatedStringElementRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: InterpolatedStringElementRef<'a>) -> AnyNodeRef<'a>
fn from(node: InterpolatedStringElementRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<LiteralExpressionRef<'a>> for AnyNodeRef<'a>
impl<'a> From<LiteralExpressionRef<'a>> for AnyNodeRef<'a>
Source§fn from(value: LiteralExpressionRef<'a>) -> AnyNodeRef<'a>
fn from(value: LiteralExpressionRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<ModRef<'a>> for AnyNodeRef<'a>
impl<'a> From<ModRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: ModRef<'a>) -> AnyNodeRef<'a>
fn from(node: ModRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<PatternRef<'a>> for AnyNodeRef<'a>
impl<'a> From<PatternRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: PatternRef<'a>) -> AnyNodeRef<'a>
fn from(node: PatternRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<StmtRef<'a>> for AnyNodeRef<'a>
impl<'a> From<StmtRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: StmtRef<'a>) -> AnyNodeRef<'a>
fn from(node: StmtRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<StringLike<'a>> for AnyNodeRef<'a>
impl<'a> From<StringLike<'a>> for AnyNodeRef<'a>
Source§fn from(value: StringLike<'a>) -> AnyNodeRef<'a>
fn from(value: StringLike<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<StringLikePart<'a>> for AnyNodeRef<'a>
impl<'a> From<StringLikePart<'a>> for AnyNodeRef<'a>
Source§fn from(value: StringLikePart<'a>) -> AnyNodeRef<'a>
fn from(value: StringLikePart<'a>) -> AnyNodeRef<'a>
Source§impl<'a> From<TypeParamRef<'a>> for AnyNodeRef<'a>
impl<'a> From<TypeParamRef<'a>> for AnyNodeRef<'a>
Source§fn from(node: TypeParamRef<'a>) -> AnyNodeRef<'a>
fn from(node: TypeParamRef<'a>) -> AnyNodeRef<'a>
Source§impl<'a> GetSize for AnyNodeRef<'a>
impl<'a> GetSize for AnyNodeRef<'a>
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Source§fn get_heap_size_with_tracker<TRACKER>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)where
TRACKER: GetSizeTracker,
fn get_heap_size_with_tracker<TRACKER>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)where
TRACKER: GetSizeTracker,
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
tracker. Read moreSource§impl HasNodeIndex for AnyNodeRef<'_>
impl HasNodeIndex for AnyNodeRef<'_>
Source§fn node_index(&self) -> &AtomicNodeIndex
fn node_index(&self) -> &AtomicNodeIndex
AtomicNodeIndex for this node.Source§impl<'a> PartialEq for AnyNodeRef<'a>
impl<'a> PartialEq for AnyNodeRef<'a>
Source§impl Ranged for AnyNodeRef<'_>
impl Ranged for AnyNodeRef<'_>
Source§impl<'a> TryFrom<AnyNodeRef<'a>> for StringLike<'a>
impl<'a> TryFrom<AnyNodeRef<'a>> for StringLike<'a>
Source§fn try_from(
value: AnyNodeRef<'a>,
) -> Result<StringLike<'a>, <StringLike<'a> as TryFrom<AnyNodeRef<'a>>>::Error>
fn try_from( value: AnyNodeRef<'a>, ) -> Result<StringLike<'a>, <StringLike<'a> as TryFrom<AnyNodeRef<'a>>>::Error>
impl<'a> Copy for AnyNodeRef<'a>
impl<'a> StructuralPartialEq for AnyNodeRef<'a>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more