pub struct FastHydrationPlugin { /* private fields */ }Expand description
FAST Hydration handler plugin.
Emits HTML comment markers around dynamic bindings so that FAST-HTML 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 FastHydrationPlugin
impl Default for FastHydrationPlugin
Source§impl HandlerPlugin for FastHydrationPlugin
impl HandlerPlugin for FastHydrationPlugin
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,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_binding_start( &mut self, name: &str, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called before rendering a binding (signal, for-loop, or if-condition).
Source§fn on_binding_end(
&mut self,
name: &str,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_binding_end( &mut self, name: &str, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called after rendering a binding.
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_plugin_data(
&mut self,
data: &[u8],
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_plugin_data( &mut self, data: &[u8], writer: &mut dyn ResponseWriter, ) -> Result<()>
Called when a plugin-specific protocol fragment is encountered.
The data is opaque bytes from the parser plugin — interpretation is plugin-defined.
Source§fn on_render_complete(
&mut self,
protocol: &WebUIProtocol,
rendered_components: &HashSet<String>,
writer: &mut dyn ResponseWriter,
) -> Result<()>
fn on_render_complete( &mut self, protocol: &WebUIProtocol, rendered_components: &HashSet<String>, writer: &mut dyn ResponseWriter, ) -> Result<()>
Called after all fragments have been rendered.
Auto Trait Implementations§
impl Freeze for FastHydrationPlugin
impl RefUnwindSafe for FastHydrationPlugin
impl Send for FastHydrationPlugin
impl Sync for FastHydrationPlugin
impl Unpin for FastHydrationPlugin
impl UnsafeUnpin for FastHydrationPlugin
impl UnwindSafe for FastHydrationPlugin
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