♻️ (pagetop): Props::unpack() exige &mut Context

This commit is contained in:
Manuel Cillero 2026-09-08 07:28:50 +02:00
parent ee1b48ff3f
commit 8577ca8a59
14 changed files with 280 additions and 190 deletions

View file

@ -25,13 +25,13 @@
//! ```rust,no_run
//! # use pagetop::prelude::*;
//! # use pagetop_htmx::prelude::*;
//! # let cx = Context::default();
//! # let mut cx = Context::default();
//! let props = Props::new(hx::GET, "/api/items")
//! .with_prop(PropsOp::set(hx::TARGET, "#list"))
//! .with_prop(PropsOp::set(hx::SWAP, hx::swap::OUTER_HTML));
//!
//! let markup = html! {
//! button (props.unpack(&cx)) { "Load" }
//! button (props.unpack(&mut cx)) { "Load" }
//! };
//! ```
//!