Enum EdgeType

Source
pub enum EdgeType {
Show 31 variants CrossDom {}, TextChange {}, RemoveNode {}, DeleteNode {}, InsertNode { parent: HtmlElementId, before: Option<HtmlElementId>, }, CreateNode {}, JsResult { value: Option<String>, }, JsCall { args: Option<String>, script_position: usize, }, RequestComplete { resource_type: String, status: String, value: Option<String>, response_hash: Option<String>, request_id: usize, headers: String, size: String, }, RequestError { status: String, request_id: usize, value: Option<String>, headers: String, size: String, }, RequestStart { request_type: RequestType, status: String, request_id: usize, }, RequestResponse, AddEventListener { key: String, event_listener_id: usize, script_id: ScriptId, }, RemoveEventListener { key: String, event_listener_id: usize, script_id: ScriptId, }, EventListener { key: String, event_listener_id: usize, }, StorageSet { key: String, value: Option<String>, }, StorageReadResult { key: String, value: Option<String>, }, DeleteStorage { key: String, }, ReadStorageCall { key: String, }, ClearStorage { key: String, }, ExecuteFromAttribute { attr_name: HtmlAttr, }, Execute {}, SetAttribute { key: HtmlAttr, value: Option<String>, is_style: bool, }, DeleteAttribute { key: HtmlAttr, is_style: bool, }, Binding {}, BindingEvent { script_position: usize, }, Filter {}, Structure {}, Shield {}, ResourceBlock {}, StorageBucket {},
}
Expand description

Represents the type of any PageGraph edge, along with any associated type-specific data. Edges in PageGraph represent actions taken by some actor in the page (e.g., a JavaScript code unit), being performed on some other element in the page (e.g., a resource being fetched). Edges are outgoing from the actor, and incoming to the actee.

Variants§

§

CrossDom

§

TextChange

§

RemoveNode

RemoveNode edges encode a HTML element being removed from the DOM tree.

The actor node will be the Script node that is removing a HTML element from the document.

The actee node will be the HtmlElement](NodeType::HtmlElement) node being removed from the document.

§

DeleteNode

DeleteNode edges encode a HTML element being deleted by JavaScript code. Note that this is a distinct action from merely removing an HTML element from a document (which is encoded with a RemoveNode edge).

The actor node will be the Script node that is delete a HTML element.

The actee node will be the HtmlElement](NodeType::HtmlElement) node being deleted.

§

InsertNode

InsertNode edges encode a HTML element being inserted into a DOM tree.

The actor node will either be the Parser (indicating that the element was inserted into the document because of text being parsed, most often from the initial HTML document) or a Script node (indicating that the element was inserted into the document dynamically).

The actee node will be a HtmlElement node depicting the HTML element being inserted into the document.

Fields

§parent: HtmlElementId

The identifier of the DOM element the actee HtmlElement node is being inserted beneath in the document.

§before: Option<HtmlElementId>

The identifier of the prior sibling DOM element the actee HtmlElement node is being inserted before in the document. If this value is not present, it indicates that the actee node was the first child of the parent node at insertion time,

§

CreateNode

CreateNode edges encode that an HTML element that was created during the execution of the page.

The actor node will either be the Parser (indicating that the element was created because it was defined in text parsed by the blink parser) or a Script node (indicating that the element was dynamically created by a JavaScript code unit (e.g., document.createElement).

The actee node will be a HtmlElement node depicting the HTML element that was created.

§

JsResult

JsResult edges encode a value being returned from a property read or a function call in JavaScript code.

The actor node will be either a WebApi node (representing the WebAPI method or property that was called) or a JsBuiltin node (representing an instrumented method or function thats defined as part of ECMAScript).

The actee node will be a Script node representing the JavaScript code unit that the value is being returned to.

Fields

§value: Option<String>

The value being returned from an API to a JavaScript code unit. Note that this will not be present for APIs that do not return a value when called, such as addEventListener).

§

JsCall

JsCall edges encode a JavaScript function/method being called by JavaScript code.

The actor node will be Script node, representing the JavaScript code unit calling the property, function, or method.

The actee node will be either a WebApi node (representing the WebAPI method or property being called) or a JsBuiltin node (representing an instrumented method or function thats defined as part of ECMAScript being called).

Fields

§args: Option<String>

An serialized version of any arguments provided when the method or function being called (if any).

§script_position: usize

The character offset in the JavaScript text where this JavaScript call occurred.

§

RequestComplete

Fields

§resource_type: String
§status: String
§response_hash: Option<String>
§request_id: usize
§headers: String
§size: String
§

RequestError

Fields

§status: String
§request_id: usize
§headers: String
§size: String
§

RequestStart

Fields

§request_type: RequestType
§status: String
§request_id: usize
§

RequestResponse

§

AddEventListener

Fields

§event_listener_id: usize
§script_id: ScriptId
§

RemoveEventListener

Fields

§event_listener_id: usize
§script_id: ScriptId
§

EventListener

Fields

§event_listener_id: usize
§

StorageSet

Fields

§

StorageReadResult

Fields

§

DeleteStorage

Fields

§

ReadStorageCall

Fields

§

ClearStorage

Fields

§

ExecuteFromAttribute

Fields

§attr_name: HtmlAttr
§

Execute

§

SetAttribute

SetAttribute edges encode JavaScript code setting an attribute on a HTML element.

The actor node will be Script node, representing the JavaScript code setting the attribute.

The actee node will be a HtmlElement node, representing the HTML element that is having an attribute set on it.

Fields

§key: HtmlAttr

The name of the HTML attribute being set (e.g., height, href, src).

§value: Option<String>

The value being assigned to the HTML attribute (if any).

§is_style: bool

If the attribute being set is part of the the element’s CSS style definition.

§

DeleteAttribute

DeleteAttribute edges encode JavaScript code deleting an attribute from a HTML element.

The actor node will be Script node, representing the JavaScript code deleting the attribute.

The actee node will be a HtmlElement node, representing the HTML element that is having the attribute deleted.

Fields

§key: HtmlAttr

The name of the HTML attribute being deleted (e.g., height, href, src).

§is_style: bool

If the attribute being deleted is part of the the element’s CSS style definition.

§

Binding

§

BindingEvent

Fields

§script_position: usize
§

Filter

§

Structure

§

Shield

§

ResourceBlock

§

StorageBucket

Trait Implementations§

Source§

impl Clone for EdgeType

Source§

fn clone(&self) -> EdgeType

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EdgeType

Source§

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

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

impl PartialEq for EdgeType

Source§

fn eq(&self, other: &EdgeType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EdgeType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EdgeType

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.