跳转到内容

AssetLease

此内容尚不支持你的语言。

Defined in: asset/AssetLease.ts:14

One acquisition, and the right to end it.

T = unknown

readonly generation: number

Defined in: asset/AssetLease.ts:17

Ledger-minted, so two eras never merge even if their values compare equal.


readonly key: string

Defined in: asset/AssetLease.ts:15


readonly value: T

Defined in: asset/AssetLease.ts:18

release(): void

Defined in: asset/AssetLease.ts:20

Give this one acquisition back. Calling twice is a no-op, not a double free.

void


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.

AssetLease<T> | null