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: f64Score 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> ) -> Self
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<LayoutShift> for LayoutShift
impl PartialEq<LayoutShift> 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
impl StructuralPartialEq for LayoutShift
Auto Trait Implementations§
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