Trait dioxus::events::RenderedElementBacking
source · pub trait RenderedElementBacking: Any {
// Required method
fn as_any(&self) -> &(dyn Any + 'static);
// Provided methods
fn get_client_rect(
&self
) -> Pin<Box<dyn Future<Output = Result<Rect<f64, f64>, MountedError>>>> { ... }
fn scroll_to(
&self,
_behavior: ScrollBehavior
) -> Pin<Box<dyn Future<Output = Result<(), MountedError>>>> { ... }
fn set_focus(
&self,
_focus: bool
) -> Pin<Box<dyn Future<Output = Result<(), MountedError>>>> { ... }
}
Available on crate feature
html
only.Expand description
An Element that has been rendered and allows reading and modifying information about it.
Different platforms will have different implementations and different levels of support for this trait. Renderers that do not support specific features will return None
for those queries.
Required Methods§
Provided Methods§
sourcefn get_client_rect(
&self
) -> Pin<Box<dyn Future<Output = Result<Rect<f64, f64>, MountedError>>>>
fn get_client_rect( &self ) -> Pin<Box<dyn Future<Output = Result<Rect<f64, f64>, MountedError>>>>
Get the bounding rectangle of the element relative to the viewport (this does not include the scroll position)
sourcefn scroll_to(
&self,
_behavior: ScrollBehavior
) -> Pin<Box<dyn Future<Output = Result<(), MountedError>>>>
fn scroll_to( &self, _behavior: ScrollBehavior ) -> Pin<Box<dyn Future<Output = Result<(), MountedError>>>>
Scroll to make the element visible