Expand description
Capability classification cache.
Stores (profile, bucket?, op) → CapabilityRecord in memory with a
configurable TTL (default 30 minutes). Future tasks may add disk persistence
via redb; the API surface is deliberately designed to accommodate that
without changing call sites.
§OCP contract
- Add a new capability class: add a
CapabilityClassvariant + one arm inrecord_from_error. Existing arms are untouched. - Add a new error pattern to classify: add one
matcharm insiderecord_from_error. The enum and store are unaffected. - Add a new scope for
clear: add aClearScopevariant + one arm inCapabilityCache::clear. Existing scopes are untouched. - Storage-class extraction uses a small substring scan; new storage class
names (e.g.
DEEP_ARCHIVE_IA) are recognized automatically when they appear in the error message after"InvalidStorageClass"or"NoSuchTransition".
Structs§
- Capability
Cache - In-memory capability classification cache.
- Capability
Handle Arcwrapper soCapabilityCachecan be registered as Tauri managed state.- Capability
Record - A cached capability result with the timestamp at which it was learned.
- Mock
Clock - Controllable clock for deterministic tests.
- System
Clock 🔒
Enums§
- Capability
Class - Classification of a single S3 operation’s capability for a (profile, bucket?, op) triple.
- Clear
Scope - What entries to remove when
CapabilityCache::clearis called.
Constants§
- DEFAULT_
TTL_ 🔒SECS - Default TTL for capability records: 30 minutes.
Traits§
- Clock 🔒
Functions§
- extract_
storage_ 🔒class - Extract the storage class name from a provider error message.
Type Aliases§
- Cache
Key 🔒 - Capability
Map - All known capabilities for a profile, keyed by
"<bucket_or_empty>/<op>".