pub struct FastV3HydrationPlugin { /* private fields */ }Expand description
FAST 3 hydration handler plugin.
Emits HTML comment markers around dynamic bindings so that FAST can re-hydrate server-rendered content on the client side.
The root scope is disabled (no markers) — hydration only activates in child scopes (components, for-loop items, if-condition bodies). This matches the C++ and JS prototype behavior.
Implementations§
Trait Implementations§
Source§impl Default for FastV3HydrationPlugin
impl Default for FastV3HydrationPlugin
Source§impl HandlerPlugin for FastV3HydrationPlugin
impl HandlerPlugin for FastV3HydrationPlugin
Source§fn write_route_component_state(
&self,
state: &Value,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn write_route_component_state( &self, state: &Value, writer: &mut dyn ResponseWriter, ) -> Result<()>
FAST emits scalar attributes on route component elements.
Components read these via @attr and their connection lifecycle.
Source§fn push_scope(&mut self)
fn push_scope(&mut self)
Enter a new scope (component or for-loop item boundary).
Typically resets per-scope counters.
Source§fn on_binding_start(
&mut self,
_name: &str,
_raw: bool,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_binding_start( &mut self, _name: &str, _raw: bool, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called before rendering a signal binding. Read more
Source§fn on_binding_end(
&mut self,
_name: &str,
_raw: bool,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_binding_end( &mut self, _name: &str, _raw: bool, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called after rendering a signal binding. Read more
Source§fn on_repeat_item_start(
&mut self,
_index: usize,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_repeat_item_start( &mut self, _index: usize, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called before rendering a repeat item in a for loop.
Source§fn on_repeat_item_end(
&mut self,
_index: usize,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_repeat_item_end( &mut self, _index: usize, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called after rendering a repeat item.
Source§fn on_element_data(
&mut self,
data: &[u8],
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_element_data( &mut self, data: &[u8], writer: &mut dyn ResponseWriter, ) -> Result<()>
Called when parser-produced element metadata is encountered.
Source§fn on_for_start(
&mut self,
name: &str,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_for_start( &mut self, name: &str, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called before rendering a for-loop block.
Defaults to
on_binding_start.Source§fn on_for_end(
&mut self,
name: &str,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_for_end( &mut self, name: &str, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called after rendering a for-loop block.
Defaults to
on_binding_end.Source§fn on_if_start(
&mut self,
name: &str,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_if_start( &mut self, name: &str, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called before rendering an if-condition block.
Defaults to
on_binding_start.Source§fn on_if_end(
&mut self,
name: &str,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_if_end( &mut self, name: &str, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called after rendering an if-condition block.
Defaults to
on_binding_end.Source§fn emit_templates(
&self,
protocol: &WebUIProtocol,
components: &[String],
_nonce: Option<&str>,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn emit_templates( &self, protocol: &WebUIProtocol, components: &[String], _nonce: Option<&str>, writer: &mut dyn ResponseWriter, ) -> Result<()>
Emit component templates collected during SSR. The default emits
each template as-is (suitable for FAST
<f-template> tags). The
WebUI split-payload path uses HandlerPlugin::collect_template_payloads
instead.Source§fn collect_template_payloads<'a>(
&self,
_protocol: &'a WebUIProtocol,
_components: &[String],
) -> Option<Vec<WebUiTemplatePayload<'a>>>
fn collect_template_payloads<'a>( &self, _protocol: &'a WebUIProtocol, _components: &[String], ) -> Option<Vec<WebUiTemplatePayload<'a>>>
Return split WebUI template payloads for the given components. Read more
Source§fn emit_templates_slice(
&self,
protocol: &WebUIProtocol,
tags: &[&str],
_nonce: Option<&str>,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn emit_templates_slice( &self, protocol: &WebUIProtocol, tags: &[&str], _nonce: Option<&str>, writer: &mut dyn ResponseWriter, ) -> Result<()>
Slice-based counterpart to
HandlerPlugin::emit_templates. Read moreSource§fn collect_template_payloads_slice<'a>(
&self,
_protocol: &'a WebUIProtocol,
_tags: &[&str],
) -> Option<Vec<WebUiTemplatePayload<'a>>>
fn collect_template_payloads_slice<'a>( &self, _protocol: &'a WebUIProtocol, _tags: &[&str], ) -> Option<Vec<WebUiTemplatePayload<'a>>>
Slice-based counterpart to
HandlerPlugin::collect_template_payloads. Read moreSource§fn emit_bootstrap_extension_payloads(
&self,
_payloads: &[WebUiTemplatePayload<'_>],
_nonce: Option<&str>,
_writer: &mut dyn ResponseWriter,
) -> Result<()>
fn emit_bootstrap_extension_payloads( &self, _payloads: &[WebUiTemplatePayload<'_>], _nonce: Option<&str>, _writer: &mut dyn ResponseWriter, ) -> Result<()>
Emit plugin-specific executable SSR bootstrap code for the streaming
path, given only the already-collected template payloads. Read more
Source§fn emit_bootstrap_extension(
&self,
_context: BootstrapExtensionContext<'_>,
_writer: &mut dyn ResponseWriter,
) -> Result<()>
fn emit_bootstrap_extension( &self, _context: BootstrapExtensionContext<'_>, _writer: &mut dyn ResponseWriter, ) -> Result<()>
Emit plugin-specific executable SSR bootstrap code, if needed. Read more
Auto Trait Implementations§
impl Freeze for FastV3HydrationPlugin
impl RefUnwindSafe for FastV3HydrationPlugin
impl Send for FastV3HydrationPlugin
impl Sync for FastV3HydrationPlugin
impl Unpin for FastV3HydrationPlugin
impl UnsafeUnpin for FastV3HydrationPlugin
impl UnwindSafe for FastV3HydrationPlugin
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