🚚 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::*;
#[derive(AssignHandle)]
#[derive(BindHandle)]
struct Drust;
impl ModuleTrait for Drust {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -44,7 +44,7 @@
//! ```rust
//! use pagetop::prelude::*;
//!
//! #[derive(AssignHandle)]
//! #[derive(BindHandle)]
//! struct HelloWorld;
//!
//! impl ModuleTrait for HelloWorld {
@ -108,7 +108,7 @@ pub use paste::paste;
/// customized default values.
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;

View file

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

View file

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