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§
Provided Methods§
Sourcefn get_bounding_client_rect(&self) -> VisibleResult<PixelsRect>
fn get_bounding_client_rect(&self) -> VisibleResult<PixelsRect>
Get the bounds rectangle of the target element
Sourcefn get_intersection_ratio(&self) -> VisibleResult<f64>
fn get_intersection_ratio(&self) -> VisibleResult<f64>
Get the ratio of the intersectionRect to the boundingClientRect
Sourcefn get_intersection_rect(&self) -> VisibleResult<PixelsRect>
fn get_intersection_rect(&self) -> VisibleResult<PixelsRect>
Get the rect representing the target’s visible area
Sourcefn is_intersecting(&self) -> VisibleResult<bool>
fn is_intersecting(&self) -> VisibleResult<bool>
Get if the target element intersects with the intersection observer’s root
Sourcefn get_root_bounds(&self) -> VisibleResult<PixelsRect>
fn get_root_bounds(&self) -> VisibleResult<PixelsRect>
Get the rect for the intersection observer’s root
Sourcefn get_time(&self) -> VisibleResult<SystemTime>
fn get_time(&self) -> VisibleResult<SystemTime>
Get a timestamp indicating the time at which the intersection was recorded
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl HasVisibleData for SerializedVisibleData
Available on crate feature
serialize only.