Skip to main content

Module quota

Module quota 

Source
Expand description

Conservative caller-owned aggregate admission for one protected root.

Charges survive every publication error and unwind. There is no refund or directory scan; recovery may construct a new ledger only from a freshly authenticated usage snapshot. This is cooperative in-process accounting, not a durable cross-process quota or a filesystem allocation limit.

Re-exports§

pub use recovery::RecoveryRootScope;
pub use staging::StagingCharge;

Modules§

recovery
Zero-growth root provenance from the actual admitted quota owner. No marker/scan reconstructs usage, per-run membership or a budget token. Host holds current protected-namespace and aggregate-quota leases throughout.
staging
Staging admission shares the existing quota’s root, usage and attempt slots.

Structs§

CustodyQuota
N bounds additional publication attempts tracked in this ledger. The host must hold its aggregate-quota lease for the ledger’s complete lifetime.
QuotaLimits
QuotaSnapshot
Host snapshot must include committed, orphan and uncertain bundle charges. The opaque snapshot ID must bind the root and current usage under the host’s trusted freshness and lease policy. Counts exclude OS/runtime allocations.

Enums§

QuotaError
QuotaPublicationError

Traits§

QuotaSnapshotAuthority

Functions§

publish_bundle_with_quota
Admit aggregate encoded bundle bytes before any producer I/O. The encoded byte cap excludes filesystem overhead and head/lock files; host disk quotas must cover those. Authority still revalidates policy during publication.
publish_chain_bundle_with_quota