Skip to main content

FrameSnapshotEvent

Struct FrameSnapshotEvent 

Source
pub struct FrameSnapshotEvent {
Show 14 fields pub call_id: String, pub phase: ActionPhase, pub snapshot_name: Option<String>, pub page_id: String, pub frame_id: String, pub frame_url: String, pub doctype: String, pub html: Value, pub viewport: Option<Viewport>, pub timestamp: f64, pub wall_time: f64, pub collection_time: f64, pub is_main_frame: bool, pub resource_overrides: Vec<ResourceOverride>,
}
Expand description

Per-frame DOM snapshot. Includes the full DOM payload, which can be sizeable; callers iterating on snapshots for many frames should expect the per-event size to dominate the overall trace memory budget.

A snapshot belongs to the action whose call_id it names, at the moment its phase says. Trace v9 writes the phase; v8 named each snapshot (before@<call>) and the phase is read back from that name, so the link is the same on both formats.

Fields§

§call_id: String§phase: ActionPhase

The moment of the action this snapshot captured.

§snapshot_name: Option<String>

The v8 snapshot name that the action’s own events refer to. None on v9, which stopped naming snapshots.

§page_id: String§frame_id: String§frame_url: String§doctype: String§html: Value

The serialized DOM, in the trace viewer’s nested-array encoding.

§viewport: Option<Viewport>§timestamp: f64§wall_time: f64§collection_time: f64§is_main_frame: bool§resource_overrides: Vec<ResourceOverride>

Trait Implementations§

Source§

impl Clone for FrameSnapshotEvent

Source§

fn clone(&self) -> FrameSnapshotEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameSnapshotEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<FrameSnapshotWire> for FrameSnapshotEvent

Source§

fn from(wire: FrameSnapshotWire) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.