🏷️ Simplifica nombres de traits esenciales

Los traits `ExtensionTrait`, `ThemeTrait` y `ComponentTrait` pasan a ser
`Extension`, `Theme`y `Component`, respectivamente,
This commit is contained in:
Manuel Cillero 2025-08-03 13:15:08 +02:00
parent fd5b48811d
commit f03f42f6d5
23 changed files with 78 additions and 79 deletions

View file

@ -3,7 +3,7 @@ use crate::prelude::*;
use crate::base::action::FnActionWithComponent;
/// Ejecuta [`FnActionWithComponent`] antes de renderizar el componente.
pub struct BeforeRender<C: ComponentTrait> {
pub struct BeforeRender<C: Component> {
f: FnActionWithComponent<C>,
referer_type_id: Option<UniqueId>,
referer_id: OptionId,
@ -11,7 +11,7 @@ pub struct BeforeRender<C: ComponentTrait> {
}
/// Filtro para despachar [`FnActionWithComponent`] antes de renderizar un componente `C`.
impl<C: ComponentTrait> ActionDispatcher for BeforeRender<C> {
impl<C: Component> ActionDispatcher for BeforeRender<C> {
/// Devuelve el identificador de tipo ([`UniqueId`]) del componente `C`.
fn referer_type_id(&self) -> Option<UniqueId> {
self.referer_type_id
@ -28,8 +28,8 @@ impl<C: ComponentTrait> ActionDispatcher for BeforeRender<C> {
}
}
impl<C: ComponentTrait> BeforeRender<C> {
/// Permite [registrar](ExtensionTrait::actions) una nueva acción [`FnActionWithComponent`].
impl<C: Component> BeforeRender<C> {
/// Permite [registrar](Extension::actions) una nueva acción [`FnActionWithComponent`].
pub fn new(f: FnActionWithComponent<C>) -> Self {
BeforeRender {
f,