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§
Sourcefn dependencies(&self) -> BTreeSet<GlobalId>
fn dependencies(&self) -> BTreeSet<GlobalId>
Sourcefn fmt_message(
&self,
f: &mut Formatter<'_>,
humanizer: &dyn ExprHumanizer,
redacted: bool,
) -> Result
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.
Sourcefn fmt_hint(
&self,
f: &mut Formatter<'_>,
humanizer: &dyn ExprHumanizer,
redacted: bool,
) -> Result
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.
Sourcefn fmt_action(
&self,
f: &mut Formatter<'_>,
humanizer: &dyn ExprHumanizer,
redacted: bool,
) -> Result
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.
Sourcefn action_kind(&self, humanizer: &dyn ExprHumanizer) -> ActionKind
fn action_kind(&self, humanizer: &dyn ExprHumanizer) -> ActionKind
The kind of action suggested by this notice.
Provided Methods§
Sourcefn message<'a>(
&'a self,
humanizer: &'a dyn ExprHumanizer,
redacted: bool,
) -> HumanizedMessage<'a, Self>
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.
Sourcefn hint<'a>(
&'a self,
humanizer: &'a dyn ExprHumanizer,
redacted: bool,
) -> HumanizedHint<'a, Self>
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.
Sourcefn action<'a>(
&'a self,
humanizer: &'a dyn ExprHumanizer,
redacted: bool,
) -> HumanizedAction<'a, Self>
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".