#[non_exhaustive]pub enum VecLayout {
FixedLength(usize),
LengthPrefix(Size),
End,
}Expand description
Supported vec binary layouts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FixedLength(usize)
Fixed length data.
If a user writes less items, Default::default() value will be used.
While it’s possible to embed custom value here, it would have serious limitations.
LengthPrefix(Size)
String is prefixed by length value
End
Read until the reader end
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VecLayout
impl RefUnwindSafe for VecLayout
impl Send for VecLayout
impl Sync for VecLayout
impl Unpin for VecLayout
impl UnwindSafe for VecLayout
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