AssetLease
此内容尚不支持你的语言。
Defined in: asset/AssetLease.ts:14
One acquisition, and the right to end it.
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”generation
Section titled “generation”
readonlygeneration:number
Defined in: asset/AssetLease.ts:17
Ledger-minted, so two eras never merge even if their values compare equal.
readonlykey:string
Defined in: asset/AssetLease.ts:15
readonlyvalue:T
Defined in: asset/AssetLease.ts:18
Methods
Section titled “Methods”release()
Section titled “release()”release():
void
Defined in: asset/AssetLease.ts:20
Give this one acquisition back. Calling twice is a no-op, not a double free.
Returns
Section titled “Returns”void
retain()
Section titled “retain()”retain():
AssetLease<T> |null
Defined in: asset/AssetLease.ts:28
A second receipt for the SAME generation — an owner splitting what it holds.
Not a re-acquire: this era may already be superseded, which is exactly when loading the path again hands back a different instance than the one the splitting owner is bound to. Null when the ledger has forgotten it.
Returns
Section titled “Returns”AssetLease<T> | null