pub enum CompilerWrapperRequest {
Disabled,
Use {
wrapper: CompilerWrapperKind,
},
}Expand description
What the user (or a manifest layer) asked for, structurally.
Disabled is explicit opt-out: a higher-precedence layer can
no longer turn a wrapper back on. Use(_) selects a specific
wrapper kind. Layers that did not express any preference are
represented as Option::None at the call site, not as a variant
here.
Variants§
Disabled
“No wrapper at all”. Equivalent to the manifest value
compiler-wrapper = "none" and the CLI flag
--no-compiler-wrapper / --compiler-wrapper none.
Use
Use the named wrapper. The bare command (ccache,
sccache) is searched on PATH; missing executables are
rejected by the resolver.
Fields
wrapper: CompilerWrapperKindImplementations§
Source§impl CompilerWrapperRequest
impl CompilerWrapperRequest
Sourcepub fn parse(raw: &str) -> Result<Self, CompilerWrapperParseError>
pub fn parse(raw: &str) -> Result<Self, CompilerWrapperParseError>
Parse a manifest / CLI / env value. Accepts:
"none"(case-insensitive) →Self::Disabled."ccache"→Use(Ccache)."sccache"→Use(Sccache).
Anything else is rejected. Path-shaped inputs are
deliberately not accepted today: the resolver expects to
do its own PATH search so the resulting selection stays
machine-independent. A future revision may add a path
variant; until then the conservative “named-only” surface
is the documented contract.
§Errors
Returns CompilerWrapperParseError::Empty when raw is empty after
trimming, and CompilerWrapperParseError::Unsupported for any value
other than none/off/disabled, ccache, or sccache.
Sourcepub const fn as_key(&self) -> &'static str
pub const fn as_key(&self) -> &'static str
Stable display string. Round-trips with Self::parse.
Trait Implementations§
Source§impl Clone for CompilerWrapperRequest
impl Clone for CompilerWrapperRequest
Source§fn clone(&self) -> CompilerWrapperRequest
fn clone(&self) -> CompilerWrapperRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompilerWrapperRequest
impl Debug for CompilerWrapperRequest
Source§impl<'de> Deserialize<'de> for CompilerWrapperRequest
impl<'de> Deserialize<'de> for CompilerWrapperRequest
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>,
Source§impl Hash for CompilerWrapperRequest
impl Hash for CompilerWrapperRequest
Source§impl PartialEq for CompilerWrapperRequest
impl PartialEq for CompilerWrapperRequest
Source§fn eq(&self, other: &CompilerWrapperRequest) -> bool
fn eq(&self, other: &CompilerWrapperRequest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CompilerWrapperRequest
impl Serialize for CompilerWrapperRequest
impl Copy for CompilerWrapperRequest
impl Eq for CompilerWrapperRequest
impl StructuralPartialEq for CompilerWrapperRequest
Auto Trait Implementations§
impl Freeze for CompilerWrapperRequest
impl RefUnwindSafe for CompilerWrapperRequest
impl Send for CompilerWrapperRequest
impl Sync for CompilerWrapperRequest
impl Unpin for CompilerWrapperRequest
impl UnsafeUnpin for CompilerWrapperRequest
impl UnwindSafe for CompilerWrapperRequest
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.