Struct dataflow_types::Explanation [−][src]
pub struct Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>, {
formatter: &'a Formatter,
expr_humanizer: &'a dyn ExprHumanizer,
sources: Vec<(GlobalId, &'a LinearOperator)>,
views: Vec<(GlobalId, &'a ViewExpr)>,
finishing: Option<RowSetFinishing>,
}
Expand description
An Explanation
facilitates pretty-printing of the parts of a
DataflowDescription
that are relevant to dataflow rendering.
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
formatter: &'a Formatter
Determines how sources and views are formatted
expr_humanizer: &'a dyn ExprHumanizer
sources: Vec<(GlobalId, &'a LinearOperator)>
Each source that has some LinearOperator
.
views: Vec<(GlobalId, &'a ViewExpr)>
One ViewExplanation
per view in the dataflow.
finishing: Option<RowSetFinishing>
An optional RowSetFinishing
to mention at the end.
Implementations
impl<'a, Formatter, ViewExpr> Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>,
impl<'a, Formatter, ViewExpr> Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>,
pub fn new(
expr: &'a ViewExpr,
expr_humanizer: &'a dyn ExprHumanizer,
formatter: &'a Formatter
) -> Self
pub fn new_from_dataflow(
dataflow: &'a DataflowDescription<ViewExpr>,
expr_humanizer: &'a dyn ExprHumanizer,
formatter: &'a Formatter
) -> Self
Attach a RowSetFinishing
to the explanation.
Trait Implementations
impl<'a, Formatter: Debug, ViewExpr: Debug> Debug for Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>,
impl<'a, Formatter: Debug, ViewExpr: Debug> Debug for Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>,
impl<'a, Formatter, ViewExpr> Display for Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>,
impl<'a, Formatter, ViewExpr> Display for Explanation<'a, Formatter, ViewExpr> where
Formatter: ViewFormatter<ViewExpr>,
Auto Trait Implementations
impl<'a, Formatter, ViewExpr> !RefUnwindSafe for Explanation<'a, Formatter, ViewExpr>
impl<'a, Formatter, ViewExpr> !Send for Explanation<'a, Formatter, ViewExpr>
impl<'a, Formatter, ViewExpr> !Sync for Explanation<'a, Formatter, ViewExpr>
impl<'a, Formatter, ViewExpr> Unpin for Explanation<'a, Formatter, ViewExpr>
impl<'a, Formatter, ViewExpr> !UnwindSafe for Explanation<'a, Formatter, ViewExpr>
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