Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / snapshotUsage

Function: snapshotUsage()

ts
function snapshotUsage(usage): Usage;

Defined in: packages/core/src/l0/usage.ts:113

One field read per property, returning a detached plain copy. Both accounting boundaries validate and consume THIS snapshot, never the adapter-owned object, so a hostile accessor cannot answer the validator with valid counts and the accumulator with garbage.

Parameters

ParameterType
usageUsage

Returns

Usage