pub enum Str<E: Sized> {
B8 {
buf: [E; 8],
len: u8,
},
B16 {
buf: [E; 16],
len: u8,
},
B32 {
buf: [E; 32],
len: u8,
},
B64 {
buf: [E; 64],
len: u8,
},
B128 {
buf: [E; 128],
len: u8,
},
B256 {
buf: [E; 256],
len: u8,
},
Boxed {
buf: Box<[E]>,
len: usize,
},
Empty,
}
Expand description
A fixed-capacity or heap-allocated buffer storing elements of type E
.
Small buffers (up to 256 elements) are stored inline; larger ones use heap allocation.
Variants§
Implementations§
Trait Implementations§
Source§impl<E> Ord for Str<E>
impl<E> Ord for Str<E>
Source§impl<E> PartialOrd for Str<E>
impl<E> PartialOrd for Str<E>
impl<E> Eq for Str<E>
Auto Trait Implementations§
impl<E> Freeze for Str<E>where
E: Freeze,
impl<E> RefUnwindSafe for Str<E>where
E: RefUnwindSafe,
impl<E> Send for Str<E>where
E: Send,
impl<E> Sync for Str<E>where
E: Sync,
impl<E> Unpin for Str<E>where
E: Unpin,
impl<E> UnwindSafe for Str<E>where
E: UnwindSafe,
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