Skip to main content

AgentResponse

Enum AgentResponse 

Source
pub enum AgentResponse {
Show 25 variants Hello { protocol: u8, agent_version: String, }, TaskBegun { run: String, }, TaskCommitted, Blob { path: Option<PathBuf>, }, Blobs { paths: Vec<Option<PathBuf>>, }, Stored { path: PathBuf, }, ActionResult { result: Option<RemoteActionResult>, }, ActionHitRecorded, ActionVerificationRecorded, BypassRecorded, UnconsultedRecorded, CompilerInvocationRecorded, ActionStored { path: PathBuf, }, ActionPrediction { prediction: Option<ActionPrediction>, }, ActionPredictionRecorded, ExecutableIdentity { stdout: Option<Vec<u8>>, }, Error { message: String, }, WarningRecorded, FileDigests { digests: Vec<Option<CacheDigest>>, }, FileDigestsRecorded, ActionPromise { claim: Option<String>, prediction: Option<ActionPrediction>, }, ActionPromiseCompleted, FileDigestsResolved { resolutions: Vec<FileDigestResolution>, }, WrapperTimingRecorded, ErrorRecorded,
}
Expand description

A response returned by the task-scoped cache agent.

Variants§

§

Hello

Successful protocol negotiation.

Fields

§protocol: u8

Agent protocol version.

§agent_version: String

Human-readable agent version.

§

TaskBegun

A task prediction run was begun.

Fields

§run: String

Opaque run identifier to pass to compiler shims and commit later.

§

TaskCommitted

A task prediction run was committed.

§

Blob

A local CAS path already verified against the requested digest.

Fields

§path: Option<PathBuf>

Verified local path, or None on a cache miss.

§

Blobs

Local CAS paths already verified against the requested digests.

Fields

§paths: Vec<Option<PathBuf>>

Verified local paths or misses, in request order.

§

Stored

A blob was stored locally.

Fields

§path: PathBuf

Path of the stored object in the local CAS.

§

ActionResult

Result of an action lookup.

Fields

§result: Option<RemoteActionResult>

Validated action result, or None on a cache miss.

§

ActionHitRecorded

Hit statistics were updated.

§

ActionVerificationRecorded

Verification statistics were updated.

§

BypassRecorded

Bypass statistics were updated.

§

UnconsultedRecorded

Unconsulted-compilation statistics were updated.

§

CompilerInvocationRecorded

Compiler invocation accounting was recorded.

§

ActionStored

An action result was stored.

Fields

§path: PathBuf

Path of the stored local action-result record.

§

ActionPrediction

Result of an input-prediction lookup.

Fields

§prediction: Option<ActionPrediction>

Matching prediction, or None when none is known.

§

ActionPredictionRecorded

An input prediction was recorded.

§

ExecutableIdentity

Result of an executable-identity lookup.

Fields

§stdout: Option<Vec<u8>>

Captured output, or None when no identity is cached.

§

Error

The request failed without terminating the agent connection.

Fields

§message: String

Human-readable failure description.

§

WarningRecorded

A shim diagnostic was accepted for the session to surface.

Kept after Error so this acknowledgement remains alongside the existing diagnostic response without changing earlier variants.

§

FileDigests

Digests recorded earlier for the requested file identities.

Fields

§digests: Vec<Option<CacheDigest>>

Recorded digests or misses, in request order.

§

FileDigestsRecorded

File digests were recorded.

§

ActionPromise

State of an optional server-wide compilation promise.

Fields

§claim: Option<String>

Opaque lease owned by this client, when it should compile.

§prediction: Option<ActionPrediction>

Completed prediction, when another client compiled first.

§

ActionPromiseCompleted

A server-wide compilation promise was fulfilled or safely skipped.

§

FileDigestsResolved

Digests and scope-specific validation outcomes for requested files.

Fields

§resolutions: Vec<FileDigestResolution>

Resolution outcomes in request order.

§

WrapperTimingRecorded

Wrapper phase timings were recorded.

§

ErrorRecorded

A fatal shim diagnostic was accepted for the session to surface.

This is appended to preserve every existing response variant and wire shape while giving fatal diagnostics their own acknowledgement.

Trait Implementations§

Source§

impl Clone for AgentResponse

Source§

fn clone(&self) -> AgentResponse

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AgentResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AgentResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more