Struct dioxus_html::events::MountedData
source · pub struct MountedData { /* private fields */ }
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.
Implementations§
source§impl MountedData
impl MountedData
sourcepub fn new(registry: impl RenderedElementBacking + 'static) -> Self
pub fn new(registry: impl RenderedElementBacking + 'static) -> Self
Create a new MountedData
sourcepub fn get_raw_element(&self) -> MountedResult<&dyn Any>
pub fn get_raw_element(&self) -> MountedResult<&dyn Any>
Get the renderer specific element for the given id
sourcepub async fn get_client_rect(&self) -> MountedResult<Rect<f64, f64>>
pub async fn get_client_rect(&self) -> MountedResult<Rect<f64, f64>>
Get the bounding rectangle of the element relative to the viewport (this does not include the scroll position)
sourcepub fn scroll_to(
&self,
behavior: ScrollBehavior
) -> Pin<Box<dyn Future<Output = MountedResult<()>>>>
pub fn scroll_to( &self, behavior: ScrollBehavior ) -> Pin<Box<dyn Future<Output = MountedResult<()>>>>
Scroll to make the element visible
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MountedData
impl !Send for MountedData
impl !Sync for MountedData
impl Unpin for MountedData
impl !UnwindSafe for MountedData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more