pub struct AdmitPreflight {
pub command: String,
pub compound: Vec<String>,
pub is_compilation: bool,
pub family: Option<String>,
pub required: RequiredCapabilities,
pub proof_policy: bool,
pub job_mode: bool,
pub base_recommendation: AdmitRecommendation,
pub detail: String,
}Expand description
The result of a read-only admit preflight.
Fields§
§command: StringThe command as given.
compound: Vec<String>Sub-commands when the input is a compound shell form (a && b); a single
command yields one element.
is_compilation: boolWhether the (whole) command is a compilation worth offloading.
family: Option<String>The compilation family, when classified (e.g. cargo_build, bun_test).
required: RequiredCapabilitiesCapabilities a worker must have to run it.
proof_policy: boolWhether proof/strict-remote policy is in force (caller-supplied).
job_mode: boolWhether this was preflighted as a job-mode admission (--job), where
the compilation classifier is bypassed rather than consulted.
base_recommendation: AdmitRecommendationThe decision before daemon candidate data is folded in.
detail: StringOperator-facing explanation.
Implementations§
Source§impl AdmitPreflight
impl AdmitPreflight
Sourcepub fn with_required_tools(self, required_tools: Vec<String>) -> Self
pub fn with_required_tools(self, required_tools: Vec<String>) -> Self
Add explicit compiler capabilities without bypassing classification or replacing the command’s existing Rust/target/toolchain requirements.
Sourcepub fn as_job(self, required_tools: Vec<String>) -> Self
pub fn as_job(self, required_tools: Vec<String>) -> Self
Re-frame a preflight as a JOB-mode admission (rch exec --job).
Job mode bypasses the compilation classifier rather than consulting it,
so a job is offload-eligible whatever the classifier thought: ./fuzz.sh
is not a compilation and must still preflight as offload, otherwise
this command would answer local for every workload job mode exists to
serve.
The classification facts are KEPT rather than cleared. A caller that
passes cargo test to --job should still be able to see that it would
have classified as a compilation — that is usually a mistake worth
noticing, and erasing the evidence would hide it.
Required tools are caller-stated, never derived: RCH cannot know that a shell script shells out to clang.
Trait Implementations§
Source§impl Clone for AdmitPreflight
impl Clone for AdmitPreflight
Source§impl Debug for AdmitPreflight
impl Debug for AdmitPreflight
Source§impl<'de> Deserialize<'de> for AdmitPreflight
impl<'de> Deserialize<'de> for AdmitPreflight
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AdmitPreflight
Source§impl PartialEq for AdmitPreflight
impl PartialEq for AdmitPreflight
Source§impl Serialize for AdmitPreflight
impl Serialize for AdmitPreflight
impl StructuralPartialEq for AdmitPreflight
Auto Trait Implementations§
impl Freeze for AdmitPreflight
impl RefUnwindSafe for AdmitPreflight
impl Send for AdmitPreflight
impl Sync for AdmitPreflight
impl Unpin for AdmitPreflight
impl UnsafeUnpin for AdmitPreflight
impl UnwindSafe for AdmitPreflight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.