pub enum BitWidth {
U8 = 1,
U16 = 2,
U24 = 3,
U32 = 4,
}Expand description
Discriminant for the current per-element storage width of a CompactVec.
The numeric value of each variant equals its byte size, so BitWidth as usize directly gives the elem_size.
§Ordering
BitWidth implements Ord: narrower widths compare less than wider ones,
so code can use <, >, and max() without any extra mapping.
Variants§
Trait Implementations§
Source§impl Ord for BitWidth
impl Ord for BitWidth
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for BitWidth
impl PartialOrd for BitWidth
impl Copy for BitWidth
impl Eq for BitWidth
impl StructuralPartialEq for BitWidth
Auto Trait Implementations§
impl Freeze for BitWidth
impl RefUnwindSafe for BitWidth
impl Send for BitWidth
impl Sync for BitWidth
impl Unpin for BitWidth
impl UnsafeUnpin for BitWidth
impl UnwindSafe for BitWidth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more