pub trait RenderedElementBacking {
    // Provided methods
    fn get_raw_element(&self) -> MountedResult<&dyn Any> { ... }
    fn get_client_rect(
        &self
    ) -> Pin<Box<dyn Future<Output = MountedResult<Rect<f64, f64>>>>> { ... }
    fn scroll_to(
        &self,
        _behavior: ScrollBehavior
    ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>> { ... }
    fn set_focus(
        &self,
        _focus: bool
    ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>> { ... }
}
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.

Provided Methods§

source

fn get_raw_element(&self) -> MountedResult<&dyn Any>

Get the renderer specific element for the given id

source

fn get_client_rect( &self ) -> Pin<Box<dyn Future<Output = MountedResult<Rect<f64, f64>>>>>

Get the bounding rectangle of the element relative to the viewport (this does not include the scroll position)

source

fn scroll_to( &self, _behavior: ScrollBehavior ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>>

Scroll to make the element visible

source

fn set_focus( &self, _focus: bool ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>>

Set the focus on the element

Implementations on Foreign Types§

source§

impl RenderedElementBacking for Element

source§

fn get_client_rect( &self ) -> Pin<Box<dyn Future<Output = MountedResult<Rect<f64, f64>>>>>

source§

fn get_raw_element(&self) -> MountedResult<&dyn Any>

source§

fn scroll_to( &self, behavior: ScrollBehavior ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>>

source§

fn set_focus( &self, focus: bool ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>>

source§

impl RenderedElementBacking for ()

Implementors§