const_struct 0.6.6

macro that allows const structures to be passed as const generics
Documentation
//! # const_struct
//!
//! This crate provides a way to create a struct with const generics and const values.
//! ```
//! use const_struct::{primitive::F32Ty, F32};
//! pub fn tester<A: F32Ty>() {
//!     println!("a: {:?}", A::__DATA);
//! }
//! fn main() {
//!     tester::<F32!(0.5)>();
//! }
//! ```
//!
//! This crate is no_std.
//! used unsafe code:
//! * `core::mem::zeroed`
//! * `core::mem::transmute`
//!
//! example code
//! ```ignore
//! use const_struct::{call_with_generics, const_struct, ConstStruct};
//! #[derive(ConstStruct, Debug)]
//! pub struct TestGenerics<const T: usize> {
//!     float: f32,
//! }
//! const COUNT: usize = 7;
//! #[const_struct]
//! const B: TestGenerics<{ COUNT }> = TestGenerics { float: 0.0 };
//! const fn constant<const T: usize, S: TestGenericsTy<T>>() -> f32 {
//!     S::FLOAT
//! }
//!
//! const FLOAT: f32 = call_with_generics!(constant::<test_generics!(BTy)>());
//! ```
//!
//! If you see other complex example code,
//! you see https://github.com/oligamiq/const_struct/tree/main/crates/test_code
//!
//! See the Github README for more information.
#![no_std]

pub mod prelude;
pub mod primitive;
pub use primitive::PrimitiveTraits;
pub mod struct_prim;
pub mod util_macro;
pub use const_struct_derive::*;
pub mod keeptype;
pub mod const_default;
pub use const_default::ConstDefault;

#[macro_export]
macro_rules! init {
    () => {
        #[doc(hidden)]
        #[allow(dead_code)]
        pub(crate) struct ConstStructHashBridge<
            const NAME_HASH: u64,
            const FILE_NAME_HASH: u64,
            const COLUMN: u32,
            const LINE: u32,
        >;
    };
}