use array_trait::{Array, length::Length};
use crate::{Bulk, IntoBulk};
#[rustc_on_unimplemented(
message = "cannot determine the length of bulk `{Self}` at compile-time",
label = "the bulk `{Self}` is not statically sized",
)]
pub unsafe trait StaticBulk: Bulk<
MinLength = Self::Array<()>,
MaxLength = Self::Array<()>
> + Sized
{
type Array<U>: const Array<Elem = U> + Length<Elem = U> + const IntoBulk<Item = U>;
}
unsafe impl<T, const N: usize> StaticBulk for T
where
T: Bulk<
MinLength = [(); N],
MaxLength = [(); N]
> + Sized
{
type Array<U> = [U; N];
}