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 working buffer for inline
writes. Override alongside Write::write_bufs for types where large
Bytes fields go via push; failing to do so 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 Bytes 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