From 4b218d9ad80aff999ce6983ddb19cf9e995b90c8 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Sun, 4 Jun 2023 10:00:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Publica=20constantes=20de=20defi?= =?UTF-8?q?niciones=20del=20core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop/src/core/component.rs | 4 +++- pagetop/src/core/hook.rs | 2 +- pagetop/src/core/module.rs | 2 +- pagetop/src/core/module/definition.rs | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pagetop/src/core/component.rs b/pagetop/src/core/component.rs index 55f269df..b75cbc9a 100644 --- a/pagetop/src/core/component.rs +++ b/pagetop/src/core/component.rs @@ -2,7 +2,9 @@ mod context; pub use context::{ContextOp, RenderContext}; mod definition; -pub use definition::{component_mut, component_ref, AnyComponent, BaseComponent, ComponentTrait}; +pub use definition::{ + component_mut, component_ref, AnyComponent, BaseComponent, ComponentTrait, COMPONENT_UNNAMED, +}; mod one; pub use one::OneComponent; diff --git a/pagetop/src/core/hook.rs b/pagetop/src/core/hook.rs index 2ccd6768..9fbf7045 100644 --- a/pagetop/src/core/hook.rs +++ b/pagetop/src/core/hook.rs @@ -1,5 +1,5 @@ mod definition; -pub use definition::{action_ref, AnyHookAction, HookActionTrait}; +pub use definition::{action_ref, AnyHookAction, HookActionTrait, HOOK_UNNAMED}; mod holder; use holder::ActionsHolder; diff --git a/pagetop/src/core/module.rs b/pagetop/src/core/module.rs index 24fe5016..6266ddd8 100644 --- a/pagetop/src/core/module.rs +++ b/pagetop/src/core/module.rs @@ -1,5 +1,5 @@ mod definition; -pub use definition::{BaseModule, ModuleStaticRef, ModuleTrait}; +pub use definition::{BaseModule, ModuleStaticRef, ModuleTrait, MODULE_UNNAMED}; mod theme; pub use theme::{ThemeStaticRef, ThemeTrait}; diff --git a/pagetop/src/core/module/definition.rs b/pagetop/src/core/module/definition.rs index 71197055..9f1837f0 100644 --- a/pagetop/src/core/module/definition.rs +++ b/pagetop/src/core/module/definition.rs @@ -10,7 +10,7 @@ use crate::db::MigrationItem; pub type ModuleStaticRef = &'static dyn ModuleTrait; -define_handle!(APP_UNNAMED); +define_handle!(MODULE_UNNAMED); pub trait BaseModule { fn single_name(&self) -> &'static str; @@ -19,7 +19,7 @@ pub trait BaseModule { /// Los módulos deben implementar este *trait*. pub trait ModuleTrait: BaseModule + Send + Sync { fn handle(&self) -> Handle { - APP_UNNAMED + MODULE_UNNAMED } fn name(&self) -> L10n {