🚧 Generalize crate scope handle creation

This commit is contained in:
Manuel Cillero 2023-08-14 23:29:23 +02:00
parent d0774bfd3f
commit 3d86115f97
4 changed files with 6 additions and 6 deletions

View file

@ -32,7 +32,7 @@ macro_rules! actions_for_component {
// ACTION BEFORE PREPARE COMPONENT
// *************************************************************************************
$crate::new_handle!([<ACTION_BEFORE_PREPARE_ $Component:upper>] for Action);
$crate::new_handle!([<ACTION_BEFORE_PREPARE_ $Component:upper>] for Crate);
pub struct [<BeforePrepare $Component>] {
action: Option<[<FnAction $Component>]>,
@ -91,7 +91,7 @@ macro_rules! actions_for_component {
// ACTION AFTER PREPARE COMPONENT
// *************************************************************************************
$crate::new_handle!([<ACTION_AFTER_PREPARE_ $Component:upper>] for Action);
$crate::new_handle!([<ACTION_AFTER_PREPARE_ $Component:upper>] for Crate);
pub struct [<AfterPrepare $Component>] {
action: Option<[<FnAction $Component>]>,

View file

@ -3,7 +3,7 @@ use crate::response::page::action::FnActionPage;
use crate::response::page::Page;
use crate::{new_handle, Handle, Weight};
new_handle!(ACTION_AFTER_PREPARE_BODY for Action);
new_handle!(ACTION_AFTER_PREPARE_BODY for Crate);
pub struct ActionAfterPrepareBody {
action: Option<FnActionPage>,

View file

@ -3,7 +3,7 @@ use crate::response::page::action::FnActionPage;
use crate::response::page::Page;
use crate::{new_handle, Handle, Weight};
new_handle!(ACTION_BEFORE_PREPARE_BODY for Action);
new_handle!(ACTION_BEFORE_PREPARE_BODY for Crate);
pub struct ActionBeforePrepareBody {
action: Option<FnActionPage>,

View file

@ -112,8 +112,8 @@ macro_rules! new_handle {
pub const $HANDLE: $crate::Handle =
$crate::util::handle(module_path!(), file!(), line!(), column!());
};
( $HANDLE:ident for Action ) => {
/// Constant handle to represent a unique PageTop action.
( $HANDLE:ident for Crate ) => {
/// Local constant handle to represent a unique PageTop building element.
pub(crate) const $HANDLE: $crate::Handle =
$crate::util::handle(module_path!(), file!(), line!(), column!());
};