#[repr(i32)]pub enum CacheRootKind {
Unspecified = 0,
CacheData = 1,
CacheLogs = 2,
CacheLocks = 3,
CacheRuntime = 4,
CacheTmp = 5,
CacheConfig = 6,
CacheIndex = 7,
CacheJournal = 8,
CacheSecrets = 9,
}Expand description
Logical role classification for cache roots. Wire values mirror v1’s
broker_v1.CacheRootKind EXACTLY (see broker_v1_manifest.proto).
Keeping the integer values aligned avoids subtle bugs when consumers
mix the two generations (e.g. via as i32 casts in test fixtures or
in code that bridges between v1 and v2). New kinds land in the
reserved range; v1’s enum is FROZEN so anything past 9 is v2-only.
Variants§
Unspecified = 0
Unknown / unset (proto3 zero value). Consumers MUST treat this as “ignore” rather than a real cache role.
CacheData = 1
Primary cache data (the largest root; sccache-style content store).
CacheLogs = 2
Log directory (daemon stderr / structured event log).
CacheLocks = 3
PID files, lock files, sockets, manifests, identity JSON.
CacheRuntime = 4
Copied daemon binaries (relocated install destination).
CacheTmp = 5
Temporary / ephemeral working tree (artifact build scratch, depfile staging, repeatedly emptied).
CacheConfig = 6
User config (do NOT prune).
CacheIndex = 7
Separately bounded index (redb, depgraph snapshot, compile journal).
CacheJournal = 8
WAL files needing separate fsync semantics.
CacheSecrets = 9
API keys / tokens. mode 0600. NEVER LOGGED.
Implementations§
Source§impl CacheRootKind
impl CacheRootKind
Source§impl CacheRootKind
impl CacheRootKind
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for CacheRootKind
impl Clone for CacheRootKind
Source§fn clone(&self) -> CacheRootKind
fn clone(&self) -> CacheRootKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more