pub struct v64 { /* private fields */ }
Expand description
v64 is the type of a variable integer encoding. It can represent any value of 64-bits or fewer. The encoding follows the protocol buffer spec, which means that negative numbers will always serialize to ten bytes.
Trait Implementations§
source§impl Packable for v64
impl Packable for v64
source§fn pack_sz(&self) -> usize
fn pack_sz(&self) -> usize
pack_sz
returns the number of bytes required to serialize the Packable object.source§fn pack(&self, out: &mut [u8])
fn pack(&self, out: &mut [u8])
pack
fills in the buffer out
with the packed binary representation of the Packable
object. The implementor is responsible to ensure that out
is exactly pack_sz()
bytes
and implementations are encouraged to assert this. Read moresource§fn stream<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
fn stream<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
stream
writes the object to the provided writer using the same representation that would
be used in a call to pack
. The implementor is responsible for making sure that the
number of bytes written is exactly equal to the number of required bytes. Read moresource§impl<'a> Unpackable<'a> for v64
impl<'a> Unpackable<'a> for v64
impl Copy for v64
impl Eq for v64
impl StructuralPartialEq for v64
Auto Trait Implementations§
impl RefUnwindSafe for v64
impl Send for v64
impl Sync for v64
impl Unpin for v64
impl UnwindSafe for v64
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