🔥 Refactor TypeId/Any use, drop own Handle

This commit is contained in:
Manuel Cillero 2024-02-16 17:00:34 +01:00
parent 8402b7946e
commit 169e562488
59 changed files with 137 additions and 289 deletions

View file

@ -32,7 +32,6 @@
//! ```rust
//! use pagetop::prelude::*;
//!
//! #[derive(AssignHandle)]
//! struct HelloWorld;
//!
//! impl PackageTrait for HelloWorld {
@ -85,9 +84,7 @@ pub use paste::paste;
/// Custom derive for automatically implementing the [Default] trait with customized default values.
pub use smart_default::SmartDefault;
pub use pagetop_macros::{fn_with, main, test, AssignHandle, ComponentClasses};
pub(crate) use pagetop_macros::BaseHandle;
pub use pagetop_macros::{fn_with, main, test, ComponentClasses};
// *************************************************************************************************
// GLOBAL.
@ -96,19 +93,7 @@ pub(crate) use pagetop_macros::BaseHandle;
pub use once_cell::sync::Lazy as LazyStatic;
pub use static_files::Resource as StaticResource;
pub type Handle = u64;
pub trait ImplementHandle {
fn static_handle() -> Handle
where
Self: Sized;
fn matches_handle(is: Handle) -> bool
where
Self: Sized;
fn handle(&self) -> Handle;
}
pub use std::any::TypeId;
pub type Weight = i8;