Trait HasVisibleData

Source
pub trait HasVisibleData: Any {
    // Required method
    fn as_any(&self) -> &dyn Any;

    // Provided methods
    fn get_bounding_client_rect(&self) -> VisibleResult<PixelsRect> { ... }
    fn get_intersection_ratio(&self) -> VisibleResult<f64> { ... }
    fn get_intersection_rect(&self) -> VisibleResult<PixelsRect> { ... }
    fn is_intersecting(&self) -> VisibleResult<bool> { ... }
    fn get_root_bounds(&self) -> VisibleResult<PixelsRect> { ... }
    fn get_time(&self) -> VisibleResult<SystemTime> { ... }
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

return self as Any

Provided Methods§

Source

fn get_bounding_client_rect(&self) -> VisibleResult<PixelsRect>

Get the bounds rectangle of the target element

Source

fn get_intersection_ratio(&self) -> VisibleResult<f64>

Get the ratio of the intersectionRect to the boundingClientRect

Source

fn get_intersection_rect(&self) -> VisibleResult<PixelsRect>

Get the rect representing the target’s visible area

Source

fn is_intersecting(&self) -> VisibleResult<bool>

Get if the target element intersects with the intersection observer’s root

Source

fn get_root_bounds(&self) -> VisibleResult<PixelsRect>

Get the rect for the intersection observer’s root

Source

fn get_time(&self) -> VisibleResult<SystemTime>

Get a timestamp indicating the time at which the intersection was recorded

Implementors§