Struct mz_expr::explain::text::HumanizedExpr
source · pub struct HumanizedExpr<'a, T, M = HumanizedExplain> {
pub expr: &'a T,
pub cols: Option<&'a Vec<String>>,
pub mode: M,
}
Expand description
A helper struct for wrapping expressions whose text output is modulated by the presence of some local (inferred schema) or global (required redaction) context.
Fields§
§expr: &'a T
The expression to be humanized.
cols: Option<&'a Vec<String>>
An optional vector of inferred column names to be used when rendering
column references in expr
.
mode: M
The rendering mode to use. See HumanizerMode
for details.
Implementations§
source§impl<'a, T, M: HumanizerMode> HumanizedExpr<'a, T, M>
impl<'a, T, M: HumanizerMode> HumanizedExpr<'a, T, M>
sourcepub fn child<U>(&self, expr: &'a U) -> HumanizedExpr<'a, U, M>
pub fn child<U>(&self, expr: &'a U) -> HumanizedExpr<'a, U, M>
Wrap the given child expr
into a HumanizedExpr
using the same
cols
and mode
as self
.
Trait Implementations§
source§impl<'a, T: Clone, M: Clone> Clone for HumanizedExpr<'a, T, M>
impl<'a, T: Clone, M: Clone> Clone for HumanizedExpr<'a, T, M>
source§fn clone(&self) -> HumanizedExpr<'a, T, M>
fn clone(&self) -> HumanizedExpr<'a, T, M>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, M> Display for HumanizedExpr<'a, AggregateExpr, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, AggregateExpr, M>where
M: HumanizerMode,
source§impl<'a, M> Display for HumanizedExpr<'a, AggregateFunc, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, AggregateFunc, M>where
M: HumanizerMode,
source§impl<'a, M> Display for HumanizedExpr<'a, ColumnOrder, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, ColumnOrder, M>where
M: HumanizerMode,
source§impl<'a, M> Display for HumanizedExpr<'a, Datum<'a>, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, Datum<'a>, M>where
M: HumanizerMode,
source§impl<'a, M> Display for HumanizedExpr<'a, MirScalarExpr, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, MirScalarExpr, M>where
M: HumanizerMode,
source§impl<'a, M> Display for HumanizedExpr<'a, Result<Row, EvalError>, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, Result<Row, EvalError>, M>where
M: HumanizerMode,
Render a literal value represented as a single-element Row
or an
EvalError
.
The default implemntation calls HumanizerMode::humanize_datum
for
the former and handles the error case (including redaction) directly for
the latter.
source§impl<'a, M> Display for HumanizedExpr<'a, Row, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, Row, M>where
M: HumanizerMode,
source§impl<'a, M> Display for HumanizedExpr<'a, usize, M>where
M: HumanizerMode,
impl<'a, M> Display for HumanizedExpr<'a, usize, M>where
M: HumanizerMode,
source§impl<'a, 'h, C, M> DisplayText<C> for HumanizedExpr<'a, ExplainSource<'a>, M>
impl<'a, 'h, C, M> DisplayText<C> for HumanizedExpr<'a, ExplainSource<'a>, M>
source§impl<'a, C, M> DisplayText<C> for HumanizedExpr<'a, MapFilterProject, M>
impl<'a, C, M> DisplayText<C> for HumanizedExpr<'a, MapFilterProject, M>
source§impl<'a, C, M> DisplayText<C> for HumanizedExpr<'a, PushdownInfo<'a>, M>
impl<'a, C, M> DisplayText<C> for HumanizedExpr<'a, PushdownInfo<'a>, M>
source§impl<'a, C, M> DisplayText<C> for HumanizedExpr<'a, RowSetFinishing, M>
impl<'a, C, M> DisplayText<C> for HumanizedExpr<'a, RowSetFinishing, M>
source§impl<'a, M> ScalarOps for HumanizedExpr<'a, MirScalarExpr, M>
impl<'a, M> ScalarOps for HumanizedExpr<'a, MirScalarExpr, M>
fn match_col_ref(&self) -> Option<usize>
fn references(&self, col_ref: usize) -> bool
source§impl<'a, M> ScalarOps for HumanizedExpr<'a, usize, M>
impl<'a, M> ScalarOps for HumanizedExpr<'a, usize, M>
fn match_col_ref(&self) -> Option<usize>
fn references(&self, col_ref: usize) -> bool
Auto Trait Implementations§
impl<'a, T, M> Freeze for HumanizedExpr<'a, T, M>where
M: Freeze,
impl<'a, T, M> RefUnwindSafe for HumanizedExpr<'a, T, M>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, M> Send for HumanizedExpr<'a, T, M>
impl<'a, T, M> Sync for HumanizedExpr<'a, T, M>
impl<'a, T, M> Unpin for HumanizedExpr<'a, T, M>where
M: Unpin,
impl<'a, T, M> UnwindSafe for HumanizedExpr<'a, T, M>where
M: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.