It is not possible to do the following.
slotmap::new_key_type! {
pub struct MyKey;
}
pub const fn null_key() -> MyKey {
MyKey::null() // Error: cannot call non-const associated function
}
It's not even possible to fake it.
pub const fn null_key() -> MyKey {
let key_data = KeyData::from_ffi(i32::MAX as u64);
MyKey::from(key_data) // Error: cannot call non-const associated function
}
It is not possible to do the following.
It's not even possible to fake it.