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 features
prelude and serialize 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: u128Implementations§
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 (const: unstable) · 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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.