pub struct LayoutShift {
pub value: f64,
pub had_recent_input: bool,
pub last_input_time: TimeSinceEpoch,
pub sources: Vec<LayoutShiftAttribution>,
}
Expand description
See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl LayoutShift
Fields§
§value: f64
Score increment produced by this event.
had_recent_input: bool
§last_input_time: TimeSinceEpoch
§sources: Vec<LayoutShiftAttribution>
Implementations§
source§impl LayoutShift
impl LayoutShift
pub fn new( value: impl Into<f64>, had_recent_input: impl Into<bool>, last_input_time: impl Into<TimeSinceEpoch>, sources: Vec<LayoutShiftAttribution> ) -> LayoutShift
source§impl LayoutShift
impl LayoutShift
pub fn builder() -> LayoutShiftBuilder
source§impl LayoutShift
impl LayoutShift
pub const IDENTIFIER: &'static str = "PerformanceTimeline.LayoutShift"
Trait Implementations§
source§impl Clone for LayoutShift
impl Clone for LayoutShift
source§fn clone(&self) -> LayoutShift
fn clone(&self) -> LayoutShift
Returns a copy 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 LayoutShift
impl Debug for LayoutShift
source§impl<'de> Deserialize<'de> for LayoutShift
impl<'de> Deserialize<'de> for LayoutShift
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<LayoutShift, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<LayoutShift, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for LayoutShift
impl PartialEq for LayoutShift
source§fn eq(&self, other: &LayoutShift) -> bool
fn eq(&self, other: &LayoutShift) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LayoutShift
impl Serialize for LayoutShift
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 LayoutShift
Auto Trait Implementations§
impl Freeze for LayoutShift
impl RefUnwindSafe for LayoutShift
impl Send for LayoutShift
impl Sync for LayoutShift
impl Unpin for LayoutShift
impl UnwindSafe for LayoutShift
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