API reference
python:astx:astx.BorrowRetarget
class BorrowRetarget
BorrowRetarget(target: Identifier, source: Expr, access: BorrowAccess, *, loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/borrows.py:84
Declared as: python:astx:astx.borrows.BorrowRetarget
Retarget a live borrow binding.
Attributes
-
kind — Kind of syntax node.; Type: ASTKind
-
target — Existing borrow binding.; Type: Identifier
-
source — Replacement place.; Type: Expr
-
access — Access requested for the replacement.; Type: BorrowAccess
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
Methods
-
__init__ — Initialize a borrow retargeting statement.
-
get_struct — Represent retargeting with its destination and access.