pub struct VecU64(/* private fields */);Expand description
A u64 encoded with the same framing as a Vec<u8> of its big-endian bytes.
The encoding is a varint length of 8 followed by the 8 big-endian bytes, byte-identical to the
codec encoding of a Vec<u8> holding those bytes. This lets a typed u64 share an on-disk
format with a value historically stored as a Vec<u8>.
Implementations§
Trait Implementations§
impl Copy for VecU64
Source§impl EncodeSize for VecU64
impl EncodeSize for VecU64
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§fn encode_inline_size(&self) -> usize
fn encode_inline_size(&self) -> usize
Returns the encoded size excluding bytes passed to
BufsMut::push
during Write::write_bufs. Used to size the fixed working buffer for
inline writes, so it must not be less than the bytes written inline.
Override alongside Write::write_bufs for types where large
byte fields go via push, or the working buffer will over-allocate.impl Eq for VecU64
Source§impl Read for VecU64
impl Read for VecU64
impl StructuralPartialEq for VecU64
Source§impl Write for VecU64
impl Write for VecU64
Source§fn write_bufs(&self, buf: &mut impl BufsMut)
fn write_bufs(&self, buf: &mut impl BufsMut)
Writes to a
BufsMut, allowing existing byte chunks to be
appended via BufsMut::push instead of written inline. Must encode
to the same format as Write::write. Defaults to Write::write.Auto Trait Implementations§
impl Freeze for VecU64
impl RefUnwindSafe for VecU64
impl Send for VecU64
impl Sync for VecU64
impl Unpin for VecU64
impl UnsafeUnpin for VecU64
impl UnwindSafe for VecU64
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