lightspeed/component
Component contract for Lightspeed applications.
Types
Commands returned from component updates.
pub type Command(msg) {
NoCommand
Dispatch(msg)
Push(isa.Instruction)
}
Constructors
-
NoCommand -
Dispatch(msg) -
Push(isa.Instruction)
Rendered output from a component.
The first implementation stores HTML as a string. Later versions may replace this with a renderer-neutral tree or static/dynamic segment model.
pub type Rendered {
Rendered(html: String, fingerprint: String)
}
Constructors
-
Rendered(html: String, fingerprint: String)
Values
pub fn fingerprint(rendered: Rendered) -> String
Extract the static-shape fingerprint from a rendered value.
pub fn html(markup: String) -> Rendered
Construct rendered HTML with a development fingerprint.