pub struct Profile {
pub opt_level: String,
pub debuginfo: u32,
pub debug_assertions: bool,
pub overflow_checks: bool,
pub panic: PanicStrategy,
pub strip: StripLevel,
}Expand description
Compilation profile settings observed from actual rustc arguments.
Fields§
§opt_level: String-C opt-level value as rustc saw it ("0"–"3", "s", "z").
debuginfo: u32Debug info level normalized to 0 (none), 1 (line tables), or 2 (full).
debug_assertions: boolWhether -C debug-assertions was enabled.
overflow_checks: boolWhether -C overflow-checks was enabled.
panic: PanicStrategy-C panic strategy.
strip: StripLevel-C strip level. Stripping happens at link time, so it only changes
the bytes of linked artifacts; normalized_cache_profile pins it to
None for rlibs. The canonical JSON omits none, which is the only
level artifacts registered before the field existed could carry.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn divergence(&self, requested: &Self) -> Option<(String, String)>
pub fn divergence(&self, requested: &Self) -> Option<(String, String)>
Name the fields that differ between a cached artifact’s profile
(self) and the one a compile requests, as two parallel k=v
lists. None when the two profiles are equal.
A cached artifact only serves a compile that asks for the same
profile, so a machine whose [profile.dev] diverges from the one
the public cache is built with gets no hits at all. Which knob
diverged is the whole diagnosis, and nothing downstream can
reconstruct it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Profile
impl<'de> Deserialize<'de> for Profile
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 Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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§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.