pub enum DebugInfo {
Resolved(TomlDebugInfo),
Deferred(TomlDebugInfo),
}
Expand description
The debuginfo level setting.
This is semantically a TomlDebugInfo
, and should be used as so via the
DebugInfo::into_inner
method for all intents and purposes.
Internally, it’s used to model a debuginfo level whose value can be deferred for optimization purposes: host dependencies usually don’t need the same level as target dependencies. For dependencies that are shared between the two however, that value also affects reuse: different debuginfo levels would cause to build a unit twice. By deferring the choice until we know whether to choose the optimized value or the default value, we can make sure the unit is only built once and the unit graph is still optimized.
Variants§
Resolved(TomlDebugInfo)
A debuginfo level that is fixed and will not change.
This can be set by a profile, user, or default value.
Deferred(TomlDebugInfo)
For internal purposes: a deferred debuginfo level that can be optimized away, but has this value otherwise.
Behaves like Resolved
in all situations except for the default build
dependencies profile: whenever a build dependency is not shared with
runtime dependencies, this level is weakened to a lower level that is
faster to build (see DebugInfo::weaken
).
In all other situations, this level value will be the one to use.
Implementations§
Source§impl DebugInfo
impl DebugInfo
Sourcepub fn into_inner(self) -> TomlDebugInfo
pub fn into_inner(self) -> TomlDebugInfo
The main way to interact with this debuginfo level, turning it into a TomlDebugInfo
.
Sourcepub(crate) fn is_turned_on(&self) -> bool
pub(crate) fn is_turned_on(&self) -> bool
Returns true if any debuginfo will be generated. Helper
for a common operation on the usual Option
representation.
pub(crate) fn is_deferred(&self) -> bool
Trait Implementations§
Source§impl Ord for DebugInfo
impl Ord for DebugInfo
Source§impl PartialOrd for DebugInfo
impl PartialOrd for DebugInfo
impl Copy for DebugInfo
impl Eq for DebugInfo
Auto Trait Implementations§
impl Freeze for DebugInfo
impl RefUnwindSafe for DebugInfo
impl Send for DebugInfo
impl Sync for DebugInfo
impl Unpin for DebugInfo
impl UnwindSafe for DebugInfo
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes
Size for each variant:
Resolved
: 1 byteDeferred
: 1 byte