Module resource

Module resource 

Source
Expand description

Explicit resource admission for audited canonical execution sites. Explicit admission for audited allocations. This is not an allocator or RSS bound.

Modules§

mesh
Audited mesh copy/merge admission. These helpers account requested backing storage, not allocator overhead or opaque numerical producer allocations.

Structs§

Cost
ExecutionAccount
Clone shares one deterministic request allowance, including reentered calls. Holding an account retains all storage transferred with Reservation::retain.
ModelResourcePool
Model resident admission is independent of deterministic per-request quotas. Request quotas are reserved up front; no cache lock or partial request holds a permit while waiting for another. Hosts retry WaitingForCapacity on release.
Reservation
Unique live-storage ownership. Dropping refunds live bytes only; cumulative work/copy/output/occurrences are never refunded, including failed work.
ResourceFailure
ResourceLimits
None means explicitly unlimited; Some(0) admits zero, in every dimension.
Usage

Enums§

Dimension
ExecutionPolicy
No new resource limits are imposed unless the caller explicitly opts in.
ProgramStop
RefusalReason
RequestAdmission

Functions§

account_from_source_context
allocation_failure
ambient_scope_active
Whether this thread runs inside any lexical resource scope: an execution account, a source stop, a terminal domain or (retained builds) an owned stop observer. Work inside one can be refused or degraded by that scope’s allowance, cancellation or earlier stop, so its output is not a function of its inputs alone.
charge
check_current
current_account
current_source_context
Resource-only capability transport for joined source-borrow workers. Cloning the existing account Arc allocates nothing and transfers no unrelated TLS.
detached
Run operation with none of this thread’s lexical resource state: no account, source stop, terminal or owned stop observer.
is_active
is_stopped
Poll live stop state without constructing an aggregate result for a live source-only authority. Presence and the source’s atomic stop are read afresh.
overflow
refused
stop
stop_events
The number of stop calls so far in this process.
with_source_stop
Install only a validated source capability’s shared terminal handle. The lexical guard restores the previous handle on return and unwind.
with_terminal_scope
Keep terminal stops visible for a complete consumer operation, including compatibility callers without an execution account. Nested calls share the existing terminal domain; a fresh domain is restored on return or unwind.