A very silly base trait

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

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.