[−][src]Struct rustc_mir::transform::coverage::debug::DebugCounters
If enabled, this struct maintains a map from CoverageKind IDs (as ExpressionOperandId) to
the CoverageKind data and optional label (normally, the counter's associated
BasicCoverageBlock format string, if any).
Use format_counter to convert one of these CoverageKind counters to a debug output string,
as directed by the DebugOptions. This allows the format of counter labels in logs and dump
files (including the CoverageGraph graphviz file) to be changed at runtime, via environment
variable.
DebugCounters supports a recursive rendering of Expression counters, so they can be
presented as nested expressions such as (bcb3 - (bcb0 + bcb1)).
Fields
some_counters: Option<FxHashMap<ExpressionOperandId, DebugCounter>>Implementations
impl DebugCounters[src]
pub fn new() -> Self[src]
pub fn enable(&mut self)[src]
pub fn is_enabled(&self) -> bool[src]
pub fn add_counter(
&mut self,
counter_kind: &CoverageKind,
some_block_label: Option<String>
)[src]
&mut self,
counter_kind: &CoverageKind,
some_block_label: Option<String>
)
pub fn some_block_label(&self, operand: ExpressionOperandId) -> Option<&String>[src]
pub fn format_counter(&self, counter_kind: &CoverageKind) -> String[src]
pub(in transform::coverage::debug) fn format_counter_kind(
&self,
counter_kind: &CoverageKind
) -> String[src]
&self,
counter_kind: &CoverageKind
) -> String
pub(in transform::coverage::debug) fn format_operand(
&self,
operand: ExpressionOperandId
) -> String[src]
&self,
operand: ExpressionOperandId
) -> String
Auto Trait Implementations
impl RefUnwindSafe for DebugCounters
impl Send for DebugCounters
impl Sync for DebugCounters
impl Unpin for DebugCounters
impl UnwindSafe for DebugCounters
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.