Trait small_fixed_array::ValidLength
source · pub trait ValidLength: Sealed + Default + Copy + TryFrom<usize> + Into<u32> {
const ZERO: Self;
const MAX: usize;
// Required method
fn to_usize(self) -> usize;
// Provided method
fn from_usize<T>(
val: Box<[T]>
) -> Result<(Self, Box<[T]>), InvalidLength<T>> { ... }
}
Expand description
A sealed trait to represent valid lengths for a FixedArray
.
This is implemented on u32
for non-16 bit platforms, and u16
on all platforms.
Required Associated Constants§
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.