pub trait HasVisibleData: Any {
// Required method
fn as_any(&self) -> &(dyn Any + 'static);
// Provided methods
fn get_bounding_client_rect(
&self,
) -> Result<Rect<f64, Pixels>, VisibleError> { ... }
fn get_intersection_ratio(&self) -> Result<f64, VisibleError> { ... }
fn get_intersection_rect(&self) -> Result<Rect<f64, Pixels>, VisibleError> { ... }
fn is_intersecting(&self) -> Result<bool, VisibleError> { ... }
fn get_root_bounds(&self) -> Result<Rect<f64, Pixels>, VisibleError> { ... }
fn get_time(&self) -> Result<SystemTime, VisibleError> { ... }
}
Required Methods§
Provided Methods§
Sourcefn get_bounding_client_rect(&self) -> Result<Rect<f64, Pixels>, VisibleError>
fn get_bounding_client_rect(&self) -> Result<Rect<f64, Pixels>, VisibleError>
Get the bounds rectangle of the target element
Sourcefn get_intersection_ratio(&self) -> Result<f64, VisibleError>
fn get_intersection_ratio(&self) -> Result<f64, VisibleError>
Get the ratio of the intersectionRect to the boundingClientRect
Sourcefn get_intersection_rect(&self) -> Result<Rect<f64, Pixels>, VisibleError>
fn get_intersection_rect(&self) -> Result<Rect<f64, Pixels>, VisibleError>
Get the rect representing the target’s visible area
Sourcefn is_intersecting(&self) -> Result<bool, VisibleError>
fn is_intersecting(&self) -> Result<bool, VisibleError>
Get if the target element intersects with the intersection observer’s root
Sourcefn get_root_bounds(&self) -> Result<Rect<f64, Pixels>, VisibleError>
fn get_root_bounds(&self) -> Result<Rect<f64, Pixels>, VisibleError>
Get the rect for the intersection observer’s root
Sourcefn get_time(&self) -> Result<SystemTime, VisibleError>
fn get_time(&self) -> Result<SystemTime, VisibleError>
Get a timestamp indicating the time at which the intersection was recorded