pub enum HtmlNode {
Element(Arc<HtmlElement>),
Text(String),
Comment(HtmlComment),
}
Expand description
The Node-type to use bloom in Browser-Environments. A HtmlNode is equivalent to a browser DOM-node. It can represent an HTML Element (
, , etc.),
a text-node or a comment.
HtmlNodes will be mainly constructed using bloom-rsx:
rsx!(<div id="123" on_click=|_| { alert!("clicked")} />)
Variants§
Implementations§
Trait Implementations§
Source§impl From<HtmlElement> for HtmlNode
impl From<HtmlElement> for HtmlNode
Source§fn from(element: HtmlElement) -> Self
fn from(element: HtmlElement) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for HtmlNode
Auto Trait Implementations§
impl Freeze for HtmlNode
impl !RefUnwindSafe for HtmlNode
impl Send for HtmlNode
impl Sync for HtmlNode
impl Unpin for HtmlNode
impl !UnwindSafe for HtmlNode
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