pub enum Node {
Dom(HtmlToken),
Text(String),
Vec(Vec<Node>),
Comment(Option<String>),
}
Expand description
An enum representing the different types of nodes, plus a special
wrapper Node::Vec
.
A Node
represents the result of a call to .render()
from the
Component
interface. It does not exactly represent node tree in
the DOM. Rather, CollapsedNode
is a closer representation of the
DOM.
Variants§
Implementations§
Source§impl Node
impl Node
pub fn into_collapsed_node(self, path: Vec<usize>) -> Vec<CollapsedNode>
Trait Implementations§
Source§impl Into<Vec<CollapsedNode>> for Node
impl Into<Vec<CollapsedNode>> for Node
Source§fn into(self) -> Vec<CollapsedNode>
fn into(self) -> Vec<CollapsedNode>
Converts this type into the (usually inferred) input type.
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)