Enum moxie_dom::prelude::RawNode[][src]

pub enum RawNode {
    Concrete(Node),
    Virtual(Rc<VirtNode>),
}
Expand description

A Node in the augmented DOM.

Variants

Concrete(Node)

A handle to a concrete DOM node running in the browser.

Tuple Fields of Concrete

0: Node
Virtual(Rc<VirtNode>)

A handle to a “virtual” DOM node, emulating the web in memory. While this implementation lacks many features, it can run on any target that Rust supports.

Tuple Fields of Virtual

0: Rc<VirtNode>

Implementations

Returns a reference to a virtual node, panics if this is a concrete node.

Returns a reference to a concrete DOM node, panics if this is a virtual node.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The type returned in batches by Dom::Observer.

The type returned by query_selector_all.

The type returned by observe.

Write this value as XML via the provided writer. Consider using Dom::outer_html or Dom::pretty_outer_html unless you need the performance. Read more

Returns the first child of this node.

Adds a new child to the end of this node’s children.

Returns the next child of this node’s parent after this node itself.

Removes the provided child from this node.

Replaces the provided child of this node with a new one.

Get an attribute from this DOM node.

Set an attribute on this DOM node.

Ensure the provided attribute has been removed from this DOM node.

Represents the “rendered” text content of a node and its descendants. It approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. Read more

Synchronously invokes the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent(). Read more

Returns the first descendant of self which matches the specified selectors. Read more

Returns a static (not live) Vec of descendents of self which match the specified selectors. Read more

Return a stream of mutations related to the subtree under this node.

Returns a string of serialized XML without newlines or indentation.

Returns a string of “prettified” serialized XML with the provided indentation. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Emit a pair of keydown/keyup events with key.

Dispatch the given event to this target.

Dispatch a click event to the target.

“Type” the provided text followed by the <Enter> key.

“Type” the provided text.

“Press” the <Enter> key.

Dismiss the target, causing it to lose focus.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Call op within the context of a Layer containing self.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type of the DOM node

Build, returning the output.

Begin a subtree query. The returned value supports methods like Finder::by_label_text which create queries against this container’s children. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more