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 ExprHumanizer
nodes: 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
pub fn new(
expr: &'a MirRelationExpr,
expr_humanizer: &'a dyn ExprHumanizer
) -> ViewExplanation<'a>
Attach type information into the explanation.
fn fmt_join_implementation(
&self,
f: &mut Formatter<'_>,
join_inputs: &[MirRelationExpr],
implementation: &JoinImplementation
) -> Result
Retrieves the chain ID for the specified expression.
The ExplanationNode
for expr
must have already been inserted into
the explanation.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ViewExplanation<'a>
impl<'a> !Send for ViewExplanation<'a>
impl<'a> !Sync for ViewExplanation<'a>
impl<'a> Unpin for ViewExplanation<'a>
impl<'a> !UnwindSafe for ViewExplanation<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Formats an object with the “alternative” format ({:#}
) and returns it.
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