🎨 Convierte el ciclo de renderizado en async

`prepare()` de `Component`, `render()` de `Region` y `Template`, y la
implementación de `ComponentRender` pasan a ser funciones async. Se
actualizan todos los componentes base, helpers, tests y ejemplos.
This commit is contained in:
Manuel Cillero 2026-07-06 00:48:41 +02:00
parent 9acd8cc51a
commit 9354894b3a
48 changed files with 436 additions and 365 deletions

View file

@ -94,6 +94,7 @@ pub type FnCheckPermission = fn(cx: &Context, key: &str, granted: &mut bool);
///
/// pub struct MyAuth;
///
/// #[async_trait]
/// impl Extension for MyAuth {
/// fn actions(&self) -> Vec<ActionBox> {
/// actions![CheckPermission::new(check_my_permissions)]
@ -162,7 +163,7 @@ impl CheckPermission {
/// if !has_permission(page.context(), "myapp.edit") {
/// return Err(ErrorPage::NotFound(request));
/// }
/// page.render()
/// page.render().await
/// }
/// ```
pub fn has_permission(cx: &Context, key: &str) -> bool {