NodeBuilder

Struct NodeBuilder 

Source
pub struct NodeBuilder { /* private fields */ }
Available on crate features DOM and Runtime only.

Implementations§

Source§

impl NodeBuilder

Source

pub fn node_id(&mut self, v: NodeId) -> &mut Self

Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.

Source

pub fn parent_id(&mut self, v: NodeId) -> &mut Self

The id of the parent node if any.

Source

pub fn backend_node_id(&mut self, v: BackendNodeId) -> &mut Self

The BackendNodeId for this node.

Source

pub fn node_type(&mut self, v: u32) -> &mut Self

Node’s nodeType.

Source

pub fn node_name(&mut self, v: String) -> &mut Self

Node’s nodeName.

Source

pub fn local_name(&mut self, v: String) -> &mut Self

Node’s localName.

Source

pub fn node_value(&mut self, v: String) -> &mut Self

Node’s nodeValue.

Source

pub fn child_node_count(&mut self, v: u32) -> &mut Self

Child count for Container nodes.

Source

pub fn children(&mut self, v: Vec<Node>) -> &mut Self

Child nodes of this node when requested with children.

Source

pub fn attributes(&mut self, v: Vec<String>) -> &mut Self

Attributes of the Element node in the form of flat array [name1, value1, name2, value2].

Source

pub fn document_url(&mut self, v: String) -> &mut Self

Document URL that Document or FrameOwner node points to.

Source

pub fn base_url(&mut self, v: String) -> &mut Self

Base URL that Document or FrameOwner node uses for URL completion.

Source

pub fn public_id(&mut self, v: String) -> &mut Self

DocumentType’s publicId.

Source

pub fn system_id(&mut self, v: String) -> &mut Self

DocumentType’s systemId.

Source

pub fn internal_subset(&mut self, v: String) -> &mut Self

DocumentType’s internalSubset.

Source

pub fn xml_version(&mut self, v: String) -> &mut Self

Document’s XML version in case of XML documents.

Source

pub fn name(&mut self, v: String) -> &mut Self

Attr’s name.

Source

pub fn value(&mut self, v: String) -> &mut Self

Attr’s value.

Source

pub fn pseudo_type(&mut self, v: PseudoType) -> &mut Self

Pseudo element type for this node.

Source

pub fn shadow_root_type(&mut self, v: ShadowRootType) -> &mut Self

Shadow root type.

Source

pub fn frame_id(&mut self, v: FrameId) -> &mut Self

Frame ID for frame owner elements.

Source

pub fn content_document(&mut self, v: Node) -> &mut Self

Content document for frame owner elements.

Source

pub fn shadow_roots(&mut self, v: Vec<Node>) -> &mut Self

Shadow root list for given element host.

Source

pub fn template_content(&mut self, v: Node) -> &mut Self

Content document fragment for template elements.

Source

pub fn pseudo_elements(&mut self, v: Vec<Node>) -> &mut Self

Pseudo elements associated with this node.

Source

pub fn imported_document(&mut self, v: Node) -> &mut Self

Import document for the HTMLImport links.

Source

pub fn distributed_nodes(&mut self, v: Vec<BackendNode>) -> &mut Self

Distributed nodes for given insertion point.

Source

pub fn is_svg(&mut self, v: bool) -> &mut Self

Whether the node is SVG.

Source

pub fn build(&mut self) -> Result<Node, &'static str>

Trait Implementations§

Source§

impl Clone for NodeBuilder

Source§

fn clone(&self) -> NodeBuilder

Returns a duplicate 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 NodeBuilder

Source§

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

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

impl Default for NodeBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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 = 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.