pub trait Render {
// Required method
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result;
// Provided method
fn operand_binding_power(&self) -> Option<BindingPower> { ... }
}Expand description
Render an AST node to SQL text using the resolver, source, and config carried
by ctx.
Required Methods§
Provided Methods§
Sourcefn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
The binding power this node contributes when it appears as an operand, or
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses.
An extension operator node (the X inside Expr::Other) overrides this to
report its own precedence, so a custom-operator tree is parenthesized by the
same binding-power rule as the built-in operators and round-trips through the
renderer. The value MUST equal the binding power the dialect’s
peek_infix_operator_hook reported for the same operator, so parse-time
climbing and render-time grouping stay one source of truth.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".