1#![doc = include_str!("../README.md")]
3#![no_std]
4#![forbid(unsafe_code)]
5#![allow(uncommon_codepoints)] #![warn(missing_docs)]
7#![cfg_attr(feature = "better-docs",
8 feature(doc_cfg),
9)]
10
11pub mod prelude {
12 #[doc(no_inline)]
14 pub use crate::{
15 primitive::*,
16 const_dispatch,
17 ConstDispatch,
18 };
19}
20
21pub mod primitive;
22
23#[doc(inline)] pub use ::const_dispatch_proc_macros::ConstDispatch;
29
30#[diagnostic::on_unimplemented(
37 note = "the `enum` definition is missing a `#[derive(ConstDispatch)]`",
38)]
39pub trait ConstDispatch : ඞ::MacroDerived {}
40
41mod const_dispatch_macro;
42
43mod derive;
44
45#[doc(hidden)] pub
47mod ඞ {
48 #![allow(missing_docs)]
49 pub use ::core;
50
51 pub use crate::ඞderive_ConstDispatch as derive_ConstDispatch;
52
53 pub use ::const_dispatch_proc_macros::ඞexterminate as exterminate;
54 pub use ::const_dispatch_proc_macros::ඞtry_hide as try_hide;
55
56 pub use ::paste::paste;
57 pub use ::never_say_never::Never;
58
59 pub trait MacroDerived {}
60 impl<T : ?Sized> ConstDispatch for T where Self : MacroDerived {}
61
62 use Sized as FnOnceConst;
73 use crate::ConstDispatch;
74
75 pub fn
76 const_dispatchǃ(_scrutinee: impl ConstDispatch, _dispatch: impl FnOnceConst) -> ! {
77 unimplemented!()
78 }
79}
80
81#[doc = include_str!("compile_fail_tests.md")]
82mod _compile_fail_tests {}