pub struct TimelineEventBuilder { /* private fields */ }Expand description
Builder for TimelineEvent.
Implementations§
Source§impl TimelineEventBuilder
impl TimelineEventBuilder
Sourcepub fn frame_id<VALUE: Into<FrameId>>(&mut self, value: VALUE) -> &mut Self
pub fn frame_id<VALUE: Into<FrameId>>(&mut self, value: VALUE) -> &mut Self
Identifies the frame that this event is related to. Empty for non-frame targets.
Sourcepub fn type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional “details” fields is present.
Sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Name may be empty depending on the type.
Sourcepub fn time<VALUE: Into<TimeSinceEpoch>>(&mut self, value: VALUE) -> &mut Self
pub fn time<VALUE: Into<TimeSinceEpoch>>(&mut self, value: VALUE) -> &mut Self
Time in seconds since Epoch, monotonically increasing within document lifetime.
Sourcepub fn duration<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn duration<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
Event duration, if applicable.
pub fn lcp_details<VALUE: Into<LargestContentfulPaint>>( &mut self, value: VALUE, ) -> &mut Self
pub fn layout_shift_details<VALUE: Into<LayoutShift>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn build(&self) -> Result<TimelineEvent, TimelineEventBuilderError>
pub fn build(&self) -> Result<TimelineEvent, TimelineEventBuilderError>
Trait Implementations§
Source§impl Clone for TimelineEventBuilder
impl Clone for TimelineEventBuilder
Source§fn clone(&self) -> TimelineEventBuilder
fn clone(&self) -> TimelineEventBuilder
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 TimelineEventBuilder
impl RefUnwindSafe for TimelineEventBuilder
impl Send for TimelineEventBuilder
impl Sync for TimelineEventBuilder
impl Unpin for TimelineEventBuilder
impl UnsafeUnpin for TimelineEventBuilder
impl UnwindSafe for TimelineEventBuilder
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