konst/
polymorphism.rs

1//! Miscelaneous items used for emulating polymorphism without trait methods.
2//!
3//! # `typewit`
4//!
5//! This crate uses [`typewit`] for emulating trait based polymorphism in const fns,
6//! because trait methods cannot be called in `const fn`s on stable(as of Rust 1.69.0)
7//!
8
9/// Markers used to classify types, used as `Kind` associated types.
10pub mod kinds {
11    #[doc(inline)]
12    pub use konst_kernel::polymorphism::kinds::*;
13}
14
15#[doc(no_inline)]
16pub use typewit::{
17    self, simple_type_witness, type_fn, CallFn, HasTypeWitness, MakeTypeWitness, TypeEq, TypeFn,
18    TypeWitnessTypeArg,
19};
20
21include! {"polymorphism/type_eq_projection_fn.rs"}