Skip to main content

StmtRef

Enum StmtRef 

Source
pub enum StmtRef<'a> {
Show 25 variants FunctionDef(&'a StmtFunctionDef), ClassDef(&'a StmtClassDef), Return(&'a StmtReturn), Delete(&'a StmtDelete), TypeAlias(&'a StmtTypeAlias), Assign(&'a StmtAssign), AugAssign(&'a StmtAugAssign), AnnAssign(&'a StmtAnnAssign), For(&'a StmtFor), While(&'a StmtWhile), If(&'a StmtIf), With(&'a StmtWith), Match(&'a StmtMatch), Raise(&'a StmtRaise), Try(&'a StmtTry), Assert(&'a StmtAssert), Import(&'a StmtImport), ImportFrom(&'a StmtImportFrom), Global(&'a StmtGlobal), Nonlocal(&'a StmtNonlocal), Expr(&'a StmtExpr), Pass(&'a StmtPass), Break(&'a StmtBreak), Continue(&'a StmtContinue), IpyEscapeCommand(&'a StmtIpyEscapeCommand),
}
Expand description

See also stmt

Variants§

§

FunctionDef(&'a StmtFunctionDef)

§

ClassDef(&'a StmtClassDef)

§

Return(&'a StmtReturn)

§

Delete(&'a StmtDelete)

§

TypeAlias(&'a StmtTypeAlias)

§

Assign(&'a StmtAssign)

§

AugAssign(&'a StmtAugAssign)

§

AnnAssign(&'a StmtAnnAssign)

§

For(&'a StmtFor)

§

While(&'a StmtWhile)

§

If(&'a StmtIf)

§

With(&'a StmtWith)

§

Match(&'a StmtMatch)

§

Raise(&'a StmtRaise)

§

Try(&'a StmtTry)

§

Assert(&'a StmtAssert)

§

Import(&'a StmtImport)

§

ImportFrom(&'a StmtImportFrom)

§

Global(&'a StmtGlobal)

§

Nonlocal(&'a StmtNonlocal)

§

Expr(&'a StmtExpr)

§

Pass(&'a StmtPass)

§

Break(&'a StmtBreak)

§

Continue(&'a StmtContinue)

§

IpyEscapeCommand(&'a StmtIpyEscapeCommand)

Implementations§

Source§

impl<'a> StmtRef<'a>

Source

pub const fn is_function_def_stmt(&self) -> bool

Returns true if self is of variant FunctionDef.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of FunctionDef.

§Panics

Panics if the value is not FunctionDef, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_class_def_stmt(&self) -> bool

Returns true if self is of variant ClassDef.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of ClassDef.

§Panics

Panics if the value is not ClassDef, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_return_stmt(&self) -> bool

Returns true if self is of variant Return.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Return.

§Panics

Panics if the value is not Return, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_delete_stmt(&self) -> bool

Returns true if self is of variant Delete.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Delete.

§Panics

Panics if the value is not Delete, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_type_alias_stmt(&self) -> bool

Returns true if self is of variant TypeAlias.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of TypeAlias.

§Panics

Panics if the value is not TypeAlias, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_assign_stmt(&self) -> bool

Returns true if self is of variant Assign.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Assign.

§Panics

Panics if the value is not Assign, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_aug_assign_stmt(&self) -> bool

Returns true if self is of variant AugAssign.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of AugAssign.

§Panics

Panics if the value is not AugAssign, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_ann_assign_stmt(&self) -> bool

Returns true if self is of variant AnnAssign.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of AnnAssign.

§Panics

Panics if the value is not AnnAssign, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_for_stmt(&self) -> bool

Returns true if self is of variant For.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of For.

§Panics

Panics if the value is not For, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_while_stmt(&self) -> bool

Returns true if self is of variant While.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of While.

§Panics

Panics if the value is not While, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_if_stmt(&self) -> bool

Returns true if self is of variant If.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of If.

§Panics

Panics if the value is not If, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_with_stmt(&self) -> bool

Returns true if self is of variant With.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of With.

§Panics

Panics if the value is not With, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_match_stmt(&self) -> bool

Returns true if self is of variant Match.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Match.

§Panics

Panics if the value is not Match, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_raise_stmt(&self) -> bool

Returns true if self is of variant Raise.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Raise.

§Panics

Panics if the value is not Raise, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_try_stmt(&self) -> bool

Returns true if self is of variant Try.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Try.

§Panics

Panics if the value is not Try, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_assert_stmt(&self) -> bool

Returns true if self is of variant Assert.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Assert.

§Panics

Panics if the value is not Assert, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_import_stmt(&self) -> bool

Returns true if self is of variant Import.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Import.

§Panics

Panics if the value is not Import, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_import_from_stmt(&self) -> bool

Returns true if self is of variant ImportFrom.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of ImportFrom.

§Panics

Panics if the value is not ImportFrom, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_global_stmt(&self) -> bool

Returns true if self is of variant Global.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Global.

§Panics

Panics if the value is not Global, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_nonlocal_stmt(&self) -> bool

Returns true if self is of variant Nonlocal.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Nonlocal.

§Panics

Panics if the value is not Nonlocal, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_expr_stmt(&self) -> bool

Returns true if self is of variant Expr.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Expr.

§Panics

Panics if the value is not Expr, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_pass_stmt(&self) -> bool

Returns true if self is of variant Pass.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Pass.

§Panics

Panics if the value is not Pass, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_break_stmt(&self) -> bool

Returns true if self is of variant Break.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Break.

§Panics

Panics if the value is not Break, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_continue_stmt(&self) -> bool

Returns true if self is of variant Continue.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of Continue.

§Panics

Panics if the value is not Continue, with a panic message including the content of self.

Source

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

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

Source

pub const fn is_ipy_escape_command_stmt(&self) -> bool

Returns true if self is of variant IpyEscapeCommand.

Source

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

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

Source

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

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

Source

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

Unwraps the value, yielding the content of IpyEscapeCommand.

§Panics

Panics if the value is not IpyEscapeCommand, with a panic message including the content of self.

Source

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

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

Trait Implementations§

Source§

impl<'a> Clone for StmtRef<'a>

Source§

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

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for StmtRef<'a>

Source§

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

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

impl<'a> From<&'a Stmt> for StmtRef<'a>

Source§

fn from(node: &'a Stmt) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAnnAssign> for StmtRef<'a>

Source§

fn from(node: &'a StmtAnnAssign) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAssert> for StmtRef<'a>

Source§

fn from(node: &'a StmtAssert) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAssign> for StmtRef<'a>

Source§

fn from(node: &'a StmtAssign) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtAugAssign> for StmtRef<'a>

Source§

fn from(node: &'a StmtAugAssign) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtBreak> for StmtRef<'a>

Source§

fn from(node: &'a StmtBreak) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtClassDef> for StmtRef<'a>

Source§

fn from(node: &'a StmtClassDef) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtContinue> for StmtRef<'a>

Source§

fn from(node: &'a StmtContinue) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtDelete> for StmtRef<'a>

Source§

fn from(node: &'a StmtDelete) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtExpr> for StmtRef<'a>

Source§

fn from(node: &'a StmtExpr) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtFor> for StmtRef<'a>

Source§

fn from(node: &'a StmtFor) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtFunctionDef> for StmtRef<'a>

Source§

fn from(node: &'a StmtFunctionDef) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtGlobal> for StmtRef<'a>

Source§

fn from(node: &'a StmtGlobal) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtIf> for StmtRef<'a>

Source§

fn from(node: &'a StmtIf) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtImport> for StmtRef<'a>

Source§

fn from(node: &'a StmtImport) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtImportFrom> for StmtRef<'a>

Source§

fn from(node: &'a StmtImportFrom) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtIpyEscapeCommand> for StmtRef<'a>

Source§

fn from(node: &'a StmtIpyEscapeCommand) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtMatch> for StmtRef<'a>

Source§

fn from(node: &'a StmtMatch) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtNonlocal> for StmtRef<'a>

Source§

fn from(node: &'a StmtNonlocal) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtPass> for StmtRef<'a>

Source§

fn from(node: &'a StmtPass) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtRaise> for StmtRef<'a>

Source§

fn from(node: &'a StmtRaise) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtReturn> for StmtRef<'a>

Source§

fn from(node: &'a StmtReturn) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtTry> for StmtRef<'a>

Source§

fn from(node: &'a StmtTry) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtTypeAlias> for StmtRef<'a>

Source§

fn from(node: &'a StmtTypeAlias) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtWhile> for StmtRef<'a>

Source§

fn from(node: &'a StmtWhile) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<&'a StmtWith> for StmtRef<'a>

Source§

fn from(node: &'a StmtWith) -> StmtRef<'a>

Converts to this type from the input type.
Source§

impl<'a> From<StmtRef<'a>> for AnyNodeRef<'a>

Source§

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

Converts to this type from the input type.
Source§

impl<'a> GetSize for StmtRef<'a>

Source§

fn get_heap_size(&self) -> usize

Determines how many bytes this object occupies inside the heap. Read more
Source§

fn get_heap_size_with_tracker<TRACKER>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
where TRACKER: GetSizeTracker,

Determines how many bytes this object occupies inside the heap while using a tracker. Read more
Source§

fn get_stack_size() -> usize

Determines how may bytes this object occupies inside the stack. Read more
Source§

fn get_size(&self) -> usize

Determines the total size of the object. Read more
Source§

fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)
where T: GetSizeTracker,

Determines the total size of the object while using a tracker. Read more
Source§

impl HasNodeIndex for StmtRef<'_>

Source§

fn node_index(&self) -> &AtomicNodeIndex

Returns the AtomicNodeIndex for this node.
Source§

impl<'a> PartialEq for StmtRef<'a>

Source§

fn eq(&self, other: &StmtRef<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Ranged for StmtRef<'_>

Source§

fn range(&self) -> TextRange

The range of this item in the source text.
Source§

fn start(&self) -> TextSize

The start offset of this item in the source text.
Source§

fn end(&self) -> TextSize

The end offset of this item in the source text.
Source§

impl<'a> Copy for StmtRef<'a>

Source§

impl<'a> StructuralPartialEq for StmtRef<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for StmtRef<'a>

§

impl<'a> RefUnwindSafe for StmtRef<'a>

§

impl<'a> Send for StmtRef<'a>

§

impl<'a> Sync for StmtRef<'a>

§

impl<'a> Unpin for StmtRef<'a>

§

impl<'a> UnsafeUnpin for StmtRef<'a>

§

impl<'a> UnwindSafe for StmtRef<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

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

Source§

fn exact_from(value: T) -> U

Source§

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

Source§

fn exact_into(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

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

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

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

Source§

fn wrapping_into(self) -> U

Source§

impl<T> PyThreadingConstraint for T