[−][src]Struct rustc_mir::transform::coverage::debug::DebugCounters

pub(in transform::coverage) struct DebugCounters {
    some_counters: Option<FxHashMap<ExpressionOperandId, DebugCounter>>,
}

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]

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]

pub(in transform::coverage::debug) fn format_operand(
    &self,
    operand: ExpressionOperandId
) -> String
[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]