2 releases (1 stable)
Uses new Rust 2024
| 1.0.0 | Jul 4, 2025 |
|---|---|
| 0.1.0 | Jul 4, 2025 |
#2084 in Embedded development
7,229 downloads per month
Used in 9 crates
(2 directly)
6KB
const-init
A simple trait that can be used as a bound for "can be const created".
Think of it like the Default trait, but for const values.
Useful for cases where you want a const fn new() -> Self, but only
for a subset of types that can be statically created, such as inline
buffers vs heap allocated buffers.
I got tired of writing this in multiple crates, so now it's its own crate.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.