pub trait DrawModifierNode:
Send
+ Sync
+ 'static {
// Required method
fn draw(
&self,
ctx: &mut DrawModifierContext<'_, '_>,
content: &mut dyn DrawModifierContent,
);
// Provided method
fn diagnostic_name(&self) -> &'static str { ... }
}Expand description
A node-local draw modifier.
Required Methods§
Sourcefn draw(
&self,
ctx: &mut DrawModifierContext<'_, '_>,
content: &mut dyn DrawModifierContent,
)
fn draw( &self, ctx: &mut DrawModifierContext<'_, '_>, content: &mut dyn DrawModifierContent, )
Records drawing behavior around the wrapped content.
Drawing uses the content bounds at this position in the modifier chain. For example, a background before padding includes that padding, while a background after padding covers only the inner content.
Provided Methods§
Sourcefn diagnostic_name(&self) -> &'static str
fn diagnostic_name(&self) -> &'static str
Returns the concrete modifier name used by paint inspection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".