🚧 Generalize crate scope handle creation
This commit is contained in:
parent
d0774bfd3f
commit
3d86115f97
4 changed files with 6 additions and 6 deletions
|
|
@ -32,7 +32,7 @@ macro_rules! actions_for_component {
|
||||||
// ACTION BEFORE PREPARE 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>] {
|
pub struct [<BeforePrepare $Component>] {
|
||||||
action: Option<[<FnAction $Component>]>,
|
action: Option<[<FnAction $Component>]>,
|
||||||
|
|
@ -91,7 +91,7 @@ macro_rules! actions_for_component {
|
||||||
// ACTION AFTER PREPARE 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>] {
|
pub struct [<AfterPrepare $Component>] {
|
||||||
action: Option<[<FnAction $Component>]>,
|
action: Option<[<FnAction $Component>]>,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use crate::response::page::action::FnActionPage;
|
||||||
use crate::response::page::Page;
|
use crate::response::page::Page;
|
||||||
use crate::{new_handle, Handle, Weight};
|
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 {
|
pub struct ActionAfterPrepareBody {
|
||||||
action: Option<FnActionPage>,
|
action: Option<FnActionPage>,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use crate::response::page::action::FnActionPage;
|
||||||
use crate::response::page::Page;
|
use crate::response::page::Page;
|
||||||
use crate::{new_handle, Handle, Weight};
|
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 {
|
pub struct ActionBeforePrepareBody {
|
||||||
action: Option<FnActionPage>,
|
action: Option<FnActionPage>,
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,8 @@ macro_rules! new_handle {
|
||||||
pub const $HANDLE: $crate::Handle =
|
pub const $HANDLE: $crate::Handle =
|
||||||
$crate::util::handle(module_path!(), file!(), line!(), column!());
|
$crate::util::handle(module_path!(), file!(), line!(), column!());
|
||||||
};
|
};
|
||||||
( $HANDLE:ident for Action ) => {
|
( $HANDLE:ident for Crate ) => {
|
||||||
/// Constant handle to represent a unique PageTop action.
|
/// Local constant handle to represent a unique PageTop building element.
|
||||||
pub(crate) const $HANDLE: $crate::Handle =
|
pub(crate) const $HANDLE: $crate::Handle =
|
||||||
$crate::util::handle(module_path!(), file!(), line!(), column!());
|
$crate::util::handle(module_path!(), file!(), line!(), column!());
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue