Skip to main content

Message

Enum Message 

Source
pub enum Message {
    Manifest(Manifest),
    NeedFiles(Vec<String>),
    FileData {
        path: String,
        contents: Vec<u8>,
    },
    SyncDone,
    SyncAck,
    BuildStdout(Vec<u8>),
    BuildStderr(Vec<u8>),
    BuildFinished {
        exit_code: u8,
    },
    SlotsBusy,
    Probe {
        fingerprint: [u8; 32],
        request: BuildRequest,
    },
    ProbeAccepted,
    ProbeMiss,
}

Variants§

§

Manifest(Manifest)

§

NeedFiles(Vec<String>)

§

FileData

Fields

§path: String
§contents: Vec<u8>
§

SyncDone

§

SyncAck

§

BuildStdout(Vec<u8>)

§

BuildStderr(Vec<u8>)

§

BuildFinished

Fields

§exit_code: u8
§

SlotsBusy

Server-side rejection: all slots for this (team, scope) are currently busy. The client should sleep and retry the whole connection. Sent in place of NeedFiles.

§

Probe

First message of every build attempt. Carries both a cheap “is anything stale?” fingerprint and the full build request, so the daemon can fast-path straight to cargo without waiting for a separate BuildRequest message after the probe.

Fingerprint is a hash of (path, mtime, size) for every file in the workspace — no file contents read. The daemon caches the last accepted fingerprint per (slot, team, scope) in memory; on a hit it sends ProbeAccepted and starts cargo immediately, on a miss it sends ProbeMiss and expects the usual Manifest flow before running the embedded request.

Fields

§fingerprint: [u8; 32]
§

ProbeAccepted

§

ProbeMiss

Implementations§

Source§

impl Message

Source

pub fn kind(&self) -> &'static str

Short, human-readable name of the variant — for error messages that don’t want to Debug-dump entire payloads.

Trait Implementations§

Source§

impl Debug for Message

Source§

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

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

impl<'de> Deserialize<'de> for Message

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 Message

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> 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, 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, 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.