🚚 Rename macro AssignHandle to BindHandle

This commit is contained in:
Manuel Cillero 2023-11-20 20:37:03 +01:00
parent a03472a2bc
commit dc4210bcb8
13 changed files with 15 additions and 15 deletions

View file

@ -1,6 +1,6 @@
use pagetop::prelude::*; use pagetop::prelude::*;
#[derive(AssignHandle)] #[derive(BindHandle)]
struct Drust; struct Drust;
impl ModuleTrait for Drust { impl ModuleTrait for Drust {

View file

@ -1,6 +1,6 @@
use pagetop::prelude::*; use pagetop::prelude::*;
#[derive(AssignHandle)] #[derive(BindHandle)]
struct HelloName; struct HelloName;
impl ModuleTrait for HelloName { impl ModuleTrait for HelloName {

View file

@ -1,6 +1,6 @@
use pagetop::prelude::*; use pagetop::prelude::*;
#[derive(AssignHandle)] #[derive(BindHandle)]
struct HelloWorld; struct HelloWorld;
impl ModuleTrait for HelloWorld { impl ModuleTrait for HelloWorld {

View file

@ -4,7 +4,7 @@ static_locales!(LOCALES_ADMIN);
mod summary; mod summary;
#[derive(AssignHandle)] #[derive(BindHandle)]
pub struct Admin; pub struct Admin;
impl ModuleTrait for Admin { impl ModuleTrait for Admin {

View file

@ -4,7 +4,7 @@ static_locales!(LOCALES_BOOTSIER);
static_files!(bootsier); static_files!(bootsier);
#[derive(AssignHandle)] #[derive(BindHandle)]
pub struct Bootsier; pub struct Bootsier;
impl ModuleTrait for Bootsier { impl ModuleTrait for Bootsier {

View file

@ -2,7 +2,7 @@ use pagetop::prelude::*;
static_files!(bulmix); static_files!(bulmix);
#[derive(AssignHandle)] #[derive(BindHandle)]
pub struct Bulmix; pub struct Bulmix;
impl ModuleTrait for Bulmix { impl ModuleTrait for Bulmix {

View file

@ -4,7 +4,7 @@ static_locales!(LOCALES_HOMEDEMO);
static_files!(homedemo); static_files!(homedemo);
#[derive(AssignHandle)] #[derive(BindHandle)]
pub struct HomeDemo; pub struct HomeDemo;
impl ModuleTrait for HomeDemo { impl ModuleTrait for HomeDemo {

View file

@ -128,8 +128,8 @@ pub fn base_handle_derive(input: TokenStream) -> TokenStream {
impl_handle(input, quote! { crate }) impl_handle(input, quote! { crate })
} }
#[proc_macro_derive(AssignHandle, attributes(handle))] #[proc_macro_derive(BindHandle, attributes(handle))]
pub fn assign_handle_derive(input: TokenStream) -> TokenStream { pub fn bind_handle_derive(input: TokenStream) -> TokenStream {
impl_handle(input, quote! { pagetop }) impl_handle(input, quote! { pagetop })
} }

View file

@ -5,7 +5,7 @@ static_locales!(LOCALES_NODE);
//mod entity; //mod entity;
mod migration; mod migration;
#[derive(AssignHandle)] #[derive(BindHandle)]
pub struct Node; pub struct Node;
impl ModuleTrait for Node { impl ModuleTrait for Node {

View file

@ -4,7 +4,7 @@ static_locales!(LOCALES_USER);
mod migration; mod migration;
#[derive(AssignHandle)] #[derive(BindHandle)]
pub struct User; pub struct User;
impl ModuleTrait for User { impl ModuleTrait for User {

View file

@ -44,7 +44,7 @@
//! ```rust //! ```rust
//! use pagetop::prelude::*; //! use pagetop::prelude::*;
//! //!
//! #[derive(AssignHandle)] //! #[derive(BindHandle)]
//! struct HelloWorld; //! struct HelloWorld;
//! //!
//! impl ModuleTrait for HelloWorld { //! impl ModuleTrait for HelloWorld {
@ -108,7 +108,7 @@ pub use paste::paste;
/// customized default values. /// customized default values.
pub use smart_default::SmartDefault; pub use smart_default::SmartDefault;
pub use pagetop_macros::{fn_builder, main, test, AssignHandle, ComponentClasses}; pub use pagetop_macros::{fn_builder, main, test, BindHandle, ComponentClasses};
pub(crate) use pagetop_macros::BaseHandle; pub(crate) use pagetop_macros::BaseHandle;

View file

@ -8,7 +8,7 @@ pub use crate::{Handle, HashMapResources, ImplementHandle, LazyStatic, Weight};
// Functions and macro helpers. // Functions and macro helpers.
pub use crate::util; pub use crate::util;
pub use crate::{kv, AssignHandle, ComponentClasses}; pub use crate::{kv, BindHandle, ComponentClasses};
// MACROS. // MACROS.

View file

@ -1,6 +1,6 @@
use pagetop::prelude::*; use pagetop::prelude::*;
#[derive(AssignHandle)] #[derive(BindHandle)]
struct HealthCheck; struct HealthCheck;
impl ModuleTrait for HealthCheck {} impl ModuleTrait for HealthCheck {}