pub struct SerializedVisibleData {
pub bounding_client_rect: DOMRect,
pub intersection_ratio: f64,
pub intersection_rect: DOMRect,
pub is_intersecting: bool,
pub root_bounds: DOMRect,
pub time_ms: u128,
}
Available on crate feature
html
only.Expand description
A serialized version of VisibleData
Fields§
§bounding_client_rect: DOMRect
§intersection_ratio: f64
§intersection_rect: DOMRect
§is_intersecting: bool
§root_bounds: DOMRect
§time_ms: u128
Implementations§
Trait Implementations§
Source§impl Clone for SerializedVisibleData
impl Clone for SerializedVisibleData
Source§fn clone(&self) -> SerializedVisibleData
fn clone(&self) -> SerializedVisibleData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SerializedVisibleData
impl Debug for SerializedVisibleData
Source§impl<'de> Deserialize<'de> for SerializedVisibleData
impl<'de> Deserialize<'de> for SerializedVisibleData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedVisibleData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedVisibleData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&VisibleData> for SerializedVisibleData
impl From<&VisibleData> for SerializedVisibleData
Source§fn from(data: &VisibleData) -> SerializedVisibleData
fn from(data: &VisibleData) -> SerializedVisibleData
Converts to this type from the input type.
Source§impl HasVisibleData for SerializedVisibleData
impl HasVisibleData for SerializedVisibleData
Source§fn 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
Source§fn get_intersection_ratio(&self) -> Result<f64, VisibleError>
fn get_intersection_ratio(&self) -> Result<f64, VisibleError>
Get the ratio of the intersectionRect to the boundingClientRect
Source§fn 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
Source§fn 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
Source§fn 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
Source§fn 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
Source§impl PartialEq for SerializedVisibleData
impl PartialEq for SerializedVisibleData
Source§impl Serialize for SerializedVisibleData
impl Serialize for SerializedVisibleData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SerializedVisibleData
Auto Trait Implementations§
impl Freeze for SerializedVisibleData
impl RefUnwindSafe for SerializedVisibleData
impl Send for SerializedVisibleData
impl Sync for SerializedVisibleData
impl Unpin for SerializedVisibleData
impl UnwindSafe for SerializedVisibleData
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<CustErr, T, Request> FromReq<GetUrl, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<GetUrl, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Request> FromReq<Json, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<Json, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Request> FromReq<PostUrl, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<PostUrl, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Response> FromRes<Json, Response, CustErr> for T
impl<CustErr, T, Response> FromRes<Json, Response, CustErr> for T
Source§async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>
async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the outputs from a response.
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
impl<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
Source§async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
Attempts to serialize the output into an HTTP response.
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
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.