sycamore::web

Type Alias HtmlNode

pub type HtmlNode = SsrNode;
Expand description

A type alias for the rendering backend.

Aliased Type§

enum HtmlNode {
    Element {
        tag: Cow<'static, str>,
        attributes: Vec<(Cow<'static, str>, Cow<'static, str>)>,
        bool_attributes: Vec<(Cow<'static, str>, bool)>,
        children: Vec<SsrNode>,
        inner_html: Option<Box<Cow<'static, str>>>,
        hk_key: Option<HydrationKey>,
    },
    TextDynamic {
        text: Cow<'static, str>,
    },
    TextStatic {
        text: Cow<'static, str>,
    },
    Marker,
    Dynamic {
        view: Arc<Mutex<View>>,
    },
    SuspenseMarker {
        key: u32,
    },
}

Variants§

§

Element

Fields

§tag: Cow<'static, str>
§attributes: Vec<(Cow<'static, str>, Cow<'static, str>)>
§bool_attributes: Vec<(Cow<'static, str>, bool)>
§children: Vec<SsrNode>
§inner_html: Option<Box<Cow<'static, str>>>
§

TextDynamic

Fields

§text: Cow<'static, str>
§

TextStatic

Fields

§text: Cow<'static, str>
§

Marker

§

Dynamic

SSR by default does not update to any dynamic changes in the view. This special node allows dynamically changing the view tree before it is rendered.

This is used for updating the view with suspense content once it is resolved.

Fields

§view: Arc<Mutex<View>>
§

SuspenseMarker

Fields

§key: u32