pub struct LayoutShiftBuilder { /* private fields */ }Expand description
Builder for LayoutShift.
Implementations§
Source§impl LayoutShiftBuilder
impl LayoutShiftBuilder
Sourcepub fn value<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn value<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
Score increment produced by this event.
pub fn had_recent_input<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn last_input_time<VALUE: Into<TimeSinceEpoch>>( &mut self, value: VALUE, ) -> &mut Self
pub fn sources<VALUE: Into<Vec<LayoutShiftAttribution>>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn build(&self) -> Result<LayoutShift, LayoutShiftBuilderError>
pub fn build(&self) -> Result<LayoutShift, LayoutShiftBuilderError>
Trait Implementations§
Source§impl Clone for LayoutShiftBuilder
impl Clone for LayoutShiftBuilder
Source§fn clone(&self) -> LayoutShiftBuilder
fn clone(&self) -> LayoutShiftBuilder
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 moreAuto Trait Implementations§
impl Freeze for LayoutShiftBuilder
impl RefUnwindSafe for LayoutShiftBuilder
impl Send for LayoutShiftBuilder
impl Sync for LayoutShiftBuilder
impl Unpin for LayoutShiftBuilder
impl UnsafeUnpin for LayoutShiftBuilder
impl UnwindSafe for LayoutShiftBuilder
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