constant
: Constant, compile-time evaluation tools for Rust 🦀
The constant
crate aims to provide tools for safely working around the limits imposed by constant evaluation in Rust.
Features
- Create constant default implementations
- Created nested constant default implementations
- Full support for generics, lifetimes and generics in
Constdef
impls - Almost all types provided by the
std
are supported by this crate. If you need any other external type, just open an issue and ask! - More coming soon!
Constant default implementations
const SPOOKY: SpookyFriend = default;
Nested constant default implementations
use Constdef;
static mut SYSLOAD: SystemLoad = default;
License
This library is distributed under the Apache-2.0 License.