Struct rustcn_ui::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) -> MountedData
 
pub fn new(registry: impl RenderedElementBacking + 'static) -> MountedData
Create a new MountedData
sourcepub async fn get_client_rect(&self) -> Result<Rect<f64, f64>, MountedError>
 
pub async fn get_client_rect(&self) -> Result<Rect<f64, f64>, MountedError>
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 = Result<(), MountedError>>>>
 
pub fn scroll_to( &self, behavior: ScrollBehavior ) -> Pin<Box<dyn Future<Output = Result<(), MountedError>>>>
Scroll to make the element visible
Trait Implementations§
source§impl From<&Element> for MountedData
 
impl From<&Element> for MountedData
source§fn from(e: &Element) -> MountedData
 
fn from(e: &Element) -> MountedData
Converts to this type from the input type.
source§impl From<&PlatformEventData> for MountedData
 
impl From<&PlatformEventData> for MountedData
source§fn from(val: &PlatformEventData) -> MountedData
 
fn from(val: &PlatformEventData) -> MountedData
Converts to this type from the input type.
source§impl<E> From<E> for MountedDatawhere
    E: RenderedElementBacking,
 
impl<E> From<E> for MountedDatawhere
    E: RenderedElementBacking,
source§fn from(e: E) -> MountedData
 
fn from(e: E) -> MountedData
Converts to this type from the input type.
source§impl WebEventExt<Element> for MountedData
 
impl WebEventExt<Element> for MountedData
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
source§impl<T> Instrument for T
 
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, O> SuperFrom<T> for Owhere
    O: From<T>,
 
impl<T, O> SuperFrom<T> for Owhere
    O: From<T>,
source§fn super_from(input: T) -> O
 
fn super_from(input: T) -> O
Convert from a type to another type.
source§impl<T, O, M> SuperInto<O, M> for Twhere
    O: SuperFrom<T, M>,
 
impl<T, O, M> SuperInto<O, M> for Twhere
    O: SuperFrom<T, M>,
source§fn super_into(self) -> O
 
fn super_into(self) -> O
Convert from a type to another type.