pub enum Node<Ms> {
Element(El<Ms>),
Text(Text),
Empty,
NoChange,
}
Expand description
A component in our virtual DOM.
MDN reference
web_sys
reference
Variants§
Implementations§
Source§impl<Ms> Node<Ms>
impl<Ms> Node<Ms>
Sourcepub fn add_attr(
&mut self,
key: impl Into<Cow<'static, str>>,
val: impl Into<AtValue>,
) -> &mut Self
pub fn add_attr( &mut self, key: impl Into<Cow<'static, str>>, val: impl Into<AtValue>, ) -> &mut Self
See El::add_attr
Sourcepub fn add_style(
&mut self,
key: impl Into<St>,
val: impl Into<CSSValue>,
) -> &mut Self
pub fn add_style( &mut self, key: impl Into<St>, val: impl Into<CSSValue>, ) -> &mut Self
See El::add_style
Sourcepub fn add_event_handler(
&mut self,
event_handler: EventHandler<Ms>,
) -> &mut Self
pub fn add_event_handler( &mut self, event_handler: EventHandler<Ms>, ) -> &mut Self
See El::add_event_handler
Sourcepub fn replace_text(&mut self, text: impl Into<Cow<'static, str>>) -> &mut Self
pub fn replace_text(&mut self, text: impl Into<Cow<'static, str>>) -> &mut Self
See El::replace_text
Trait Implementations§
Source§impl<Ms> IntoNodes<Ms> for Node<Ms>
impl<Ms> IntoNodes<Ms> for Node<Ms>
Source§fn into_nodes(self) -> Vec<Node<Ms>>
fn into_nodes(self) -> Vec<Node<Ms>>
Converts item or items to
Vec<Node<Ms>
.Source§impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for Node<Ms>
impl<Ms: 'static, OtherMs: 'static> MessageMapper<Ms, OtherMs> for Node<Ms>
Auto Trait Implementations§
impl<Ms> Freeze for Node<Ms>
impl<Ms> !RefUnwindSafe for Node<Ms>
impl<Ms> !Send for Node<Ms>
impl<Ms> !Sync for Node<Ms>
impl<Ms> Unpin for Node<Ms>
impl<Ms> !UnwindSafe for Node<Ms>
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