Skip to main content

NodeBuilder

Struct NodeBuilder 

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

Implementations§

Source§

impl<'a> NodeBuilder<'a>

Source

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

The id of the parent node if any.

Source

pub fn childNodeCount(self, childNodeCount: 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 documentURL(self, documentURL: impl Into<Cow<'a, str>>) -> Self

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

Source

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

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

Source

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

‘DocumentType’’s publicId.

Source

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

‘DocumentType’’s systemId.

Source

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

‘DocumentType’’s internalSubset.

Source

pub fn xmlVersion(self, xmlVersion: 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 pseudoType(self, pseudoType: PseudoType) -> Self

Pseudo element type for this node.

Source

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

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

Source

pub fn shadowRootType(self, shadowRootType: ShadowRootType) -> Self

Shadow root type.

Source

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

Frame ID for frame owner elements.

Source

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

Content document for frame owner elements.

Source

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

Shadow root list for given element host.

Source

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

Content document fragment for template elements.

Source

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

Pseudo elements associated with this node.

Source

pub fn importedDocument(self, importedDocument: 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 distributedNodes(self, distributedNodes: Vec<BackendNode<'a>>) -> Self

Distributed nodes for given insertion point.

Source

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

Whether the node is SVG.

Source

pub fn compatibilityMode(self, compatibilityMode: CompatibilityMode) -> Self

Source

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

Source

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

Source

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

Source

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

Source

pub fn adProvenance(self, adProvenance: 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.