pub trait ElementExt: Any {
Show 21 methods
// Provided methods
fn into_element(self) -> Element
where Self: Sized + Into<Element> { ... }
fn changed(&self, _other: &Rc<dyn ElementExt>) -> bool { ... }
fn diff(&self, _other: &Rc<dyn ElementExt>) -> DiffModifies { ... }
fn layout(&self) -> Cow<'_, LayoutData> { ... }
fn accessibility(&self) -> Cow<'_, AccessibilityData> { ... }
fn effect(&self) -> Option<Cow<'_, EffectData>> { ... }
fn style(&self) -> Cow<'_, StyleState> { ... }
fn is_transparent(&self) -> bool { ... }
fn text_style(&self) -> Cow<'_, TextStyleData> { ... }
fn layer(&self) -> Layer { ... }
fn events_handlers(&self) -> Option<Cow<'_, EventHandlers>> { ... }
fn measure(
&self,
_context: LayoutContext<'_>,
) -> Option<(Size2D, Rc<dyn Any>)> { ... }
fn should_hook_measurement(&self) -> bool { ... }
fn should_measure_inner_children(&self) -> bool { ... }
fn needs_post_measure(&self) -> bool { ... }
fn post_measure(
&self,
_context: PostMeasureContext<'_>,
) -> PostMeasure<NodeId> { ... }
fn is_point_inside(&self, context: EventMeasurementContext<'_>) -> bool { ... }
fn clip(&self, _context: ClipContext<'_>) { ... }
fn render(&self, _context: RenderContext<'_>) { ... }
fn render_rect(&self, area: &Area, scale_factor: f32) -> SkRRect { ... }
fn finish_accessibility(&self, _builder: &mut Node) { ... }
}Provided Methods§
fn into_element(self) -> Element
fn changed(&self, _other: &Rc<dyn ElementExt>) -> bool
fn diff(&self, _other: &Rc<dyn ElementExt>) -> DiffModifies
fn layout(&self) -> Cow<'_, LayoutData>
fn accessibility(&self) -> Cow<'_, AccessibilityData>
fn effect(&self) -> Option<Cow<'_, EffectData>>
fn style(&self) -> Cow<'_, StyleState>
Sourcefn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Whether the element paints nothing, letting events fall through to non-ancestor elements behind it.
fn text_style(&self) -> Cow<'_, TextStyleData>
fn layer(&self) -> Layer
fn events_handlers(&self) -> Option<Cow<'_, EventHandlers>>
fn measure(&self, _context: LayoutContext<'_>) -> Option<(Size2D, Rc<dyn Any>)>
fn should_hook_measurement(&self) -> bool
fn should_measure_inner_children(&self) -> bool
Sourcefn needs_post_measure(&self) -> bool
fn needs_post_measure(&self) -> bool
Whether this element needs a ElementExt::post_measure step after the layout pass.
Sourcefn post_measure(&self, _context: PostMeasureContext<'_>) -> PostMeasure<NodeId>
fn post_measure(&self, _context: PostMeasureContext<'_>) -> PostMeasure<NodeId>
Runs after this node and its children are measured.
fn is_point_inside(&self, context: EventMeasurementContext<'_>) -> bool
fn clip(&self, _context: ClipContext<'_>)
fn render(&self, _context: RenderContext<'_>)
fn render_rect(&self, area: &Area, scale_factor: f32) -> SkRRect
Sourcefn finish_accessibility(&self, _builder: &mut Node)
fn finish_accessibility(&self, _builder: &mut Node)
Mutate the accessibility node right before it enters the accessibility tree.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".