API reference
python:astx:astx.BorrowDeclaration.__init__
method __init__
__init__(name: str, type_: DataType, source: Expr, access: BorrowAccess, *, mutability: MutabilityKind = MutabilityKind.mutable, loc: SourceLocation = NO_SOURCE_LOCATION) -> None
Source: packages/astx/src/astx/borrows.py:46
Declared as: python:astx:astx.borrows.BorrowDeclaration.__init__
Initialize a local borrow declaration.
Parameters
-
name — Binding name.; Type: str
-
type_ — Declared type or an inference request.; Type: DataType
-
source — Place whose storage is borrowed.; Type: Expr
-
access — Access granted through the binding.; Type: BorrowAccess
-
mutability — Whether the binding may be retargeted.; Type: MutabilityKind
-
loc — Source coordinates.; Type: SourceLocation
Returns
Type: None