diff --git a/slhx/src/lib.rs b/slhx/src/lib.rs index c5ba711..7d32251 100644 --- a/slhx/src/lib.rs +++ b/slhx/src/lib.rs @@ -17,6 +17,11 @@ pub fn render_html(view: &impl hemplate::Hemplate) -> SafeHtml { render(view) } +/// Compatibility shim for raw slot rendering. +/// +/// Prefer generated view-module commands such as `ui::put(slot, &view)` so +/// generated resource lowering stays attached to the view boundary. req: dx/006 +#[doc(hidden)] pub trait RenderSlotExt { fn render(self, view: &impl hemplate::Hemplate) -> Effect; @@ -34,6 +39,11 @@ impl RenderSlotExt for Slot { } } +/// Compatibility shim for raw keyed slot rendering. +/// +/// Prefer generated view-module commands such as `ui::append(slot, key, &view)` +/// so generated resource lowering stays attached to the view boundary. req: dx/006 +#[doc(hidden)] pub trait RenderKeyedSlotExt { fn append(self, key: K, view: &impl hemplate::Hemplate) -> Effect; fn prepend(self, key: K, view: &impl hemplate::Hemplate) -> Effect;