Struct expr::explain::ViewExplanation[][src]

pub struct ViewExplanation<'a> {
    expr_humanizer: &'a dyn ExprHumanizer,
    nodes: Vec<ExplanationNode<'a>>,
    expr_chains: HashMap<*const MirRelationExpr, usize>,
    local_id_chains: HashMap<LocalId, usize>,
    chain_local_ids: HashMap<usize, LocalId>,
    chain: usize,
}
Expand description

An ViewExplanation facilitates pretty-printing of a MirRelationExpr.

By default, the fmt::Display implementation renders the expression as described in the module docs. Additional information may be attached to the explanation via the other public methods on the type.

Fields

expr_humanizer: &'a dyn ExprHumanizernodes: Vec<ExplanationNode<'a>>

One ExplanationNode for each MirRelationExpr in the plan, in left-to-right post-order.

expr_chains: HashMap<*const MirRelationExpr, usize>

Records the chain ID that was assigned to each expression.

local_id_chains: HashMap<LocalId, usize>

Records the chain ID that was assigned to each let.

chain_local_ids: HashMap<usize, LocalId>

Records the local ID that corresponds to a chain ID, if any.

chain: usize

The ID of the current chain. Incremented while constructing the Explanation.

Implementations

Attach type information into the explanation.

Retrieves the chain ID for the specified expression.

The ExplanationNode for expr must have already been inserted into the explanation.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Formats an object with the “alternative” format ({:#}) and returns it.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more