Skip to main content

NodeBuilder

Struct NodeBuilder 

Source
pub struct NodeBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> NodeBuilder<'a>

Source

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

The id of the parent node if any.

Source

pub fn child_node_count(self, child_node_count: u64) -> Self

Child count for ‘Container’ nodes.

Source

pub fn children(self, children: Vec<Box<Node<'a>>>) -> Self

Child nodes of this node when requested with children.

Source

pub fn attributes(self, attributes: Vec<Cow<'a, str>>) -> Self

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

Source

pub fn document_url(self, document_url: impl Into<Cow<'a, str>>) -> Self

Document URL that ‘Document’ or ‘FrameOwner’ node points to.

Source

pub fn base_url(self, base_url: impl Into<Cow<'a, str>>) -> Self

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

Source

pub fn public_id(self, public_id: impl Into<Cow<'a, str>>) -> Self

‘DocumentType’’s publicId.

Source

pub fn system_id(self, system_id: impl Into<Cow<'a, str>>) -> Self

‘DocumentType’’s systemId.

Source

pub fn internal_subset(self, internal_subset: impl Into<Cow<'a, str>>) -> Self

‘DocumentType’’s internalSubset.

Source

pub fn xml_version(self, xml_version: impl Into<Cow<'a, str>>) -> Self

‘Document’’s XML version in case of XML documents.

Source

pub fn name(self, name: impl Into<Cow<'a, str>>) -> Self

‘Attr’’s name.

Source

pub fn value(self, value: impl Into<Cow<'a, str>>) -> Self

‘Attr’’s value.

Source

pub fn pseudo_type(self, pseudo_type: impl Into<PseudoType>) -> Self

Pseudo element type for this node.

Source

pub fn pseudo_identifier( self, pseudo_identifier: impl Into<Cow<'a, str>>, ) -> Self

Pseudo element identifier for this node. Only present if there is a valid pseudoType.

Source

pub fn shadow_root_type( self, shadow_root_type: impl Into<ShadowRootType>, ) -> Self

Shadow root type.

Source

pub fn frame_id(self, frame_id: FrameId<'a>) -> Self

Frame ID for frame owner elements.

Source

pub fn content_document(self, content_document: Box<Node<'a>>) -> Self

Content document for frame owner elements.

Source

pub fn shadow_roots(self, shadow_roots: Vec<Box<Node<'a>>>) -> Self

Shadow root list for given element host.

Source

pub fn template_content(self, template_content: Box<Node<'a>>) -> Self

Content document fragment for template elements.

Source

pub fn pseudo_elements(self, pseudo_elements: Vec<Box<Node<'a>>>) -> Self

Pseudo elements associated with this node.

Source

pub fn imported_document(self, imported_document: Box<Node<'a>>) -> Self

Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.

Source

pub fn distributed_nodes(self, distributed_nodes: Vec<BackendNode<'a>>) -> Self

Distributed nodes for given insertion point.

Source

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

Whether the node is SVG.

Source

pub fn compatibility_mode( self, compatibility_mode: impl Into<CompatibilityMode>, ) -> Self

Source

pub fn assigned_slot(self, assigned_slot: BackendNode<'a>) -> Self

Source

pub fn is_scrollable(self, is_scrollable: bool) -> Self

Source

pub fn affected_by_starting_styles( self, affected_by_starting_styles: bool, ) -> Self

Source

pub fn adopted_style_sheets( self, adopted_style_sheets: Vec<StyleSheetId<'a>>, ) -> Self

Source

pub fn ad_provenance(self, ad_provenance: AdProvenance<'a>) -> Self

Source

pub fn build(self) -> Node<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for NodeBuilder<'a>

§

impl<'a> RefUnwindSafe for NodeBuilder<'a>

§

impl<'a> Send for NodeBuilder<'a>

§

impl<'a> Sync for NodeBuilder<'a>

§

impl<'a> Unpin for NodeBuilder<'a>

§

impl<'a> UnsafeUnpin for NodeBuilder<'a>

§

impl<'a> UnwindSafe for NodeBuilder<'a>

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