pub enum AgentRequest {
Show 22 variants
Hello {
protocol: u8,
client_version: String,
},
BeginTask {
task: String,
},
CommitTask {
run: String,
},
FindBlob {
digest: CacheDigest,
},
FindBlobs {
digests: Vec<CacheDigest>,
},
StoreBlob {
digest: CacheDigest,
source: PathBuf,
},
FindActionResult {
action: CacheDigest,
},
RecordActionHit {
action: CacheDigest,
restore: RestoreStats,
crate_name: Option<String>,
},
RecordBypass {
kind: String,
},
RecordUnconsulted,
RecordCompilerInvocation {
outcome: String,
crate_name: Option<String>,
duration_ns: u64,
},
RecordActionVerification {
matched: bool,
restore: RestoreStats,
},
StoreActionResult {
result: RemoteActionResult,
},
FindActionPrediction {
task: String,
invocation: CacheDigest,
},
RecordActionPrediction {
task: String,
prediction: ActionPrediction,
},
FindExecutableIdentity {
executable: PathBuf,
environment: BTreeMap<String, Option<String>>,
},
StoreExecutableIdentity {
executable: PathBuf,
environment: BTreeMap<String, Option<String>>,
stdout: Vec<u8>,
},
RecordWarning {
message: String,
},
FindFileDigests {
scope: FileDigestScope,
files: Vec<FileIdentity>,
},
RecordFileDigests {
scope: FileDigestScope,
entries: Vec<RecordedFileDigest>,
},
JoinActionPromise {
adapter: String,
invocation: CacheDigest,
},
CompleteActionPromise {
claim: String,
prediction: ActionPrediction,
},
}Expand description
A request accepted by the task-scoped cache agent.
Variants§
Hello
Negotiate protocol and application versions.
Fields
BeginTask
Begin a prediction-manifest run for a stable Cargo or task identity.
CommitTask
Commit predictions collected by an earlier Self::BeginTask.
FindBlob
Resolve a blob to a session-verified local CAS path.
Fields
digest: CacheDigestBlob to resolve.
FindBlobs
Resolve blobs to session-verified local CAS paths.
Fields
digests: Vec<CacheDigest>Blobs to resolve, preserving request order in the response.
StoreBlob
Import a file into the local content-addressed store.
FindActionResult
Look up an action-result record.
Fields
action: CacheDigestAction digest to resolve.
RecordActionHit
Account for a successfully restored cache hit.
Fields
action: CacheDigestAction that supplied the outputs.
restore: RestoreStatsRestoration work performed by the adapter.
RecordBypass
A compilation the adapter declined to cache, grouped by reason.
RecordUnconsulted
A compilation the adapter could not look up, having no key to look up with. Distinct from a bypass: these are cached once compiled.
RecordCompilerInvocation
Account for one real compiler invocation performed by the adapter.
Fields
RecordActionVerification
Account for a cache hit that was rebuilt for correctness verification.
Fields
restore: RestoreStatsRestoration work performed before rebuilding.
StoreActionResult
Store an action-result record locally and enqueue remote publication.
Fields
result: RemoteActionResultAction-result record to store.
FindActionPrediction
Find an earlier input prediction for a task and invocation.
Fields
invocation: CacheDigestDigest of the compiler invocation without discovered inputs.
RecordActionPrediction
Record an input prediction after a successful compilation.
Fields
prediction: ActionPredictionAdapter-owned prediction record.
FindExecutableIdentity
Find cached identity output for an executable and environment.
Fields
StoreExecutableIdentity
Cache identity output for an executable and environment.
Fields
RecordWarning
Surface a shim diagnostic through the session that owns the build.
A shim must not print diagnostics itself: its stderr belongs to the compiler it stands in for, and build scripts read that stream as part of the compiler’s answer – cc-rs treats any stderr output from a flag probe as “unsupported”, which changes the flags of every compilation that follows and, with them, every action key the build produces.
Appended rather than grouped with the other Record* requests it
belongs beside: these variants carry no repr, so inserting one moves
the discriminant of every variant after it, and a break nobody asked
for is worth less than the grouping. New variants go here.
FindFileDigests
Find session-recorded digests for files with these identities.
Fields
scope: FileDigestScopeWhat the recorded digests may stand in for.
files: Vec<FileIdentity>File identities to resolve, preserving request order in the response.
RecordFileDigests
Record digests of files a shim hashed or wrote this session.
Fields
scope: FileDigestScopeWhat the recorded digests may stand in for.
entries: Vec<RecordedFileDigest>Hashed files and the identities their digests describe.
JoinActionPromise
Join or claim an invocation-wide promise through the cache server.
Fields
invocation: CacheDigestDigest of the compiler invocation before input discovery.
CompleteActionPromise
Fulfill a claimed promise after its action result is remotely durable.
Fields
claim: StringOpaque claim token returned by Self::JoinActionPromise.
prediction: ActionPredictionPrediction through which waiters reconstruct the final action key.
Trait Implementations§
Source§impl Clone for AgentRequest
impl Clone for AgentRequest
Source§fn clone(&self) -> AgentRequest
fn clone(&self) -> AgentRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more