pub struct LiveFragmentProps {
pub projection: String,
pub key: String,
pub template: Value,
}Expand description
Props for the LiveFragment builtin — binds a child template to a
ferro-projection per-key snapshot for server-push in-place re-render.
First paint: the handler resolves projection + key via
ProjectionRuntime::read, serializes the state (or uses {} when absent,
per D-04), and passes the Value as the data scope for template.
On delta: the registered fragment hook re-renders template against the
new snapshot and broadcasts { html } on the same
projection.{name}.{key} channel; the client runtime swaps innerHTML.
Fields§
§projection: Stringferro-projection NAME — the Projection::NAME const of the target projection.
key: StringPer-key channel selector (the key segment of projection.{name}.{key}).
template: ValueChild template spec rendered against the snapshot as its data scope.
A serde_json::Value encoding a valid ferro-json-ui Spec.
Trait Implementations§
Source§impl Clone for LiveFragmentProps
impl Clone for LiveFragmentProps
Source§fn clone(&self) -> LiveFragmentProps
fn clone(&self) -> LiveFragmentProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LiveFragmentProps
impl Debug for LiveFragmentProps
Source§impl<'de> Deserialize<'de> for LiveFragmentProps
impl<'de> Deserialize<'de> for LiveFragmentProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for LiveFragmentProps
impl JsonSchema for LiveFragmentProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more