Enum savory::node::Node[][src]

pub enum Node<Ms> {
    Element(El<Ms>),
    Text(Text),
    Empty,
    NoChange,
}

A component in our virtual DOM. MDN reference web_sys reference

Variants

Element(El<Ms>)
Text(Text)
Empty
NoChange

Implementations

impl<Ms> Node<Ms>[src]

pub fn from_markdown(markdown: &str) -> Vec<Node<Ms>, Global>[src]

See El::from_markdown

pub fn from_html(html: &str) -> Vec<Node<Ms>, Global>[src]

See El::from_html

pub fn add_child(&mut self, node: Node<Ms>) -> &mut Node<Ms>[src]

See El::add_child

pub fn add_attr(
    &mut self,
    key: impl Into<Cow<'static, str>>,
    val: impl Into<AtValue>
) -> &mut Node<Ms>
[src]

See El::add_attr

pub fn add_class(&mut self, name: impl Into<Cow<'static, str>>) -> &mut Node<Ms>[src]

See El::add_class

pub fn add_style(
    &mut self,
    key: impl Into<St>,
    val: impl Into<CSSValue>
) -> &mut Node<Ms>
[src]

See El::add_style

pub fn add_event_handler(
    &mut self,
    event_handler: EventHandler<Ms>
) -> &mut Node<Ms>
[src]

See El::add_event_handler

pub fn add_text(&mut self, text: impl Into<Cow<'static, str>>) -> &mut Node<Ms>[src]

See El::add_text

pub fn replace_text(
    &mut self,
    text: impl Into<Cow<'static, str>>
) -> &mut Node<Ms>
[src]

See El::replace_text

pub fn get_text(&self) -> String[src]

See El::get_text

pub fn el_key(&self) -> Option<&ElKey>[src]

Retrive key attached to the El

impl<Ms> Node<Ms>[src]

pub fn new_text(text: impl Into<Cow<'static, str>>) -> Node<Ms>[src]

pub const fn is_text(&self) -> bool[src]

pub const fn is_el(&self) -> bool[src]

pub const fn is_empty(&self) -> bool[src]

pub const fn text(&self) -> Option<&Text>[src]

pub const fn el(&self) -> Option<&El<Ms>>[src]

impl<Ms> Node<Ms>[src]

Trait Implementations

impl<Msg> AndEl<Msg> for Node<Msg>[src]

impl<Msg> AttributeApi for Node<Msg>[src]

impl<Ms> Clone for Node<Ms>[src]

impl<Ms> Debug for Node<Ms> where
    Ms: Debug
[src]

impl<Msg> DeclarativeConfig for Node<Msg>[src]

impl<Ms> Display for Node<Ms>[src]

impl<Msg> ElRefExt for Node<Msg>[src]

impl<Msg: 'static> EventsApi<Msg> for Node<Msg>[src]

impl<'_, Ms> From<&'_ Element> for Node<Ms>[src]

impl<Ms> IntoNodes<Ms> for Node<Ms>[src]

impl<Msg> LookupApi<Msg> for Node<Msg>[src]

impl<Ms, OtherMs> MessageMapper<Ms, OtherMs> for Node<Ms> where
    Ms: 'static,
    OtherMs: 'static, 
[src]

type SelfWithOtherMs = Node<OtherMs>

pub fn map_msg(
    self,
    f: impl Clone + FnOnce(Ms) -> OtherMs + 'static
) -> Node<OtherMs>
[src]

See note on impl for El

impl<Msg> PushOwned<&'static str> for Node<Msg>[src]

impl<Msg> PushOwned<Cow<'static, str>> for Node<Msg>[src]

impl<Msg> PushOwned<Node<Msg>> for El<Msg>[src]

impl<Msg> PushOwned<Node<Msg>> for Node<Msg>[src]

impl<Msg> PushOwned<String> for Node<Msg>[src]

impl<Msg> PushOwned<Vec<Node<Msg>, Global>> for Node<Msg>[src]

impl<Msg> SetOwned<&'static str> for Node<Msg>[src]

impl<Msg> SetOwned<Cow<'static, str>> for Node<Msg>[src]

impl<Msg> SetOwned<Node<Msg>> for El<Msg>[src]

impl<Msg> SetOwned<Node<Msg>> for Node<Msg>[src]

impl<Msg> SetOwned<String> for Node<Msg>[src]

impl<Msg> SetOwned<Vec<Node<Msg>, Global>> for Node<Msg>[src]

impl<Ms> UpdateEl<Ms> for Node<Ms>[src]

impl<Ms> View<Ms> for Node<Ms>[src]

impl<Msg> View<Node<Msg>> for String[src]

impl<Msg> View<Node<Msg>> for &'static str[src]

impl<Msg> View<Node<Msg>> for Cow<'static, str>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,