const it!
This crate provides some utilities for use in const evaluation contexts, in particular const slicing and error handling.
The slice! and try_slice! macros slice (using any usize or range expression):
const STR: &str = slice!; // "const"
The split_slice_at! and try_split_slice_at! macros split a slice in two:
const STR: = split_slice_at!; // ("const", " slice")
The ok!, expect_ok!, unwrap_ok!, unwrap_ok_or_return!, expect_some!, unwrap_some!
and unwrap_some_or_return! macros work with Results and Options.
See the documentation at https://docs.rs/const-it