Expand description
§type-level-logic
: Primitives for type-level logic in Rust
This crate contains some useful primitive types and traits for writing type-level logic in Rust. This includes signed and unsigned numbers implemented as balanced and unbalanced ternary representations, as well as basic boolean logic. Planned features include SFINAE-style removal of trait bounds using specialization.
The type-level-logic
crate forms the base for several other crates, all offering various
sorts of static verification. For example, the tll-iterator
crate offers statically sized
iterators, which can be used to construct and convert between statically sized data structures
like those offered by the tll-array
crate.
SFINAE-like functionality will eventually be offered under the weak
module, hence the
existence of the strong
module.
type-level-logic
depends heavily on the type-operators
crate for defining type-level functionality. If you are interested in contributing, modifying,
or just plain curious, you should look at the type-operators
crate to get a good idea of
what’s going on.
If questions are had, I may be found either at my email (which is listed on GitHub) or on the #rust
IRC, where I go by
the nick sleffy
.
Re-exports§
pub use strong::*;
Modules§
- strong
- “Strongly” enforced (non-SFINAE-style) type operators. Here, “strong” means that if you use
a type operator from this module, Rust will complain if it can’t guarantee an
impl
for it and you haven’t listed it as a trait bound in awhere
clause. - types
- The
types
module contains the base types for type-level primitives, as well as the “kind” traits, which are used to emulate the idea of a kind (a “type-of-types”.) The type operators themselves are kept in thestrong
module, in preparation for the eventual support of both “weak” (SFINAE-style) and “strong” (trait bounds always required) type operators.