Uses amount of a resource, one unit by default. A charge that does not fit stops the
run and is not recorded. A charge of Resource.WordLength is the length of one word. It
fits when the length is at most the limit, and it does not add to earlier charges.
Optionalamount: numberWhether a charge of amount would fit. The call charges nothing.
The effective residual allowance for this counted resource, including ancestor limits.
The amount successfully recorded in this scope and its descendants. For Resource.WordLength
it is the largest length admitted.
Makes a budget for a part of the computation. The charges of the child also count against
this budget and every ancestor, so a child never extends its parent. What the child does
not use stays available to this budget. The label names the child in an Exhaustion.
Optionaloptions: ChildBudgetOptionsReturns the artifact of key for owner, and computes it on the first request. A root
budget and its descendants share one cache. A computation that the budget stops caches
nothing.
The resources that one computation may use. A budget stops the run when a charge does not fit, when the time has passed or when the caller cancels. Run the computation inside
attemptto receive that stop as a value.