mz_transform::notice

Trait OptimizerNoticeApi

Source
pub trait OptimizerNoticeApi: Sized {
    // Required methods
    fn dependencies(&self) -> BTreeSet<GlobalId>;
    fn fmt_message(
        &self,
        f: &mut Formatter<'_>,
        humanizer: &dyn ExprHumanizer,
        redacted: bool,
    ) -> Result;
    fn fmt_hint(
        &self,
        f: &mut Formatter<'_>,
        humanizer: &dyn ExprHumanizer,
        redacted: bool,
    ) -> Result;
    fn fmt_action(
        &self,
        f: &mut Formatter<'_>,
        humanizer: &dyn ExprHumanizer,
        redacted: bool,
    ) -> Result;
    fn action_kind(&self, humanizer: &dyn ExprHumanizer) -> ActionKind;

    // Provided methods
    fn message<'a>(
        &'a self,
        humanizer: &'a dyn ExprHumanizer,
        redacted: bool,
    ) -> HumanizedMessage<'a, Self> { ... }
    fn hint<'a>(
        &'a self,
        humanizer: &'a dyn ExprHumanizer,
        redacted: bool,
    ) -> HumanizedHint<'a, Self> { ... }
    fn action<'a>(
        &'a self,
        humanizer: &'a dyn ExprHumanizer,
        redacted: bool,
    ) -> HumanizedAction<'a, Self> { ... }
}
Expand description

An API structs RawOptimizerNotice wrapped by structs

Required Methods§

Source

fn dependencies(&self) -> BTreeSet<GlobalId>

Source

fn fmt_message( &self, f: &mut Formatter<'_>, humanizer: &dyn ExprHumanizer, redacted: bool, ) -> Result

Format the text for the optionally redacted OptimizerNotice::message value for this notice.

Source

fn fmt_hint( &self, f: &mut Formatter<'_>, humanizer: &dyn ExprHumanizer, redacted: bool, ) -> Result

Format the text for the optionally redacted OptimizerNotice::hint value for this notice.

Source

fn fmt_action( &self, f: &mut Formatter<'_>, humanizer: &dyn ExprHumanizer, redacted: bool, ) -> Result

Format the text for the optionally redacted OptimizerNotice::action value for this notice.

Source

fn action_kind(&self, humanizer: &dyn ExprHumanizer) -> ActionKind

The kind of action suggested by this notice.

Provided Methods§

Source

fn message<'a>( &'a self, humanizer: &'a dyn ExprHumanizer, redacted: bool, ) -> HumanizedMessage<'a, Self>

Return a thunk that will render the optionally redacted OptimizerNotice::message value for this notice.

Source

fn hint<'a>( &'a self, humanizer: &'a dyn ExprHumanizer, redacted: bool, ) -> HumanizedHint<'a, Self>

Return a thunk that will render the optionally redacted OptimizerNotice::hint value for this notice.

Source

fn action<'a>( &'a self, humanizer: &'a dyn ExprHumanizer, redacted: bool, ) -> HumanizedAction<'a, Self>

Return a thunk that will render the optionally redacted OptimizerNotice::action value for this notice.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§