pub struct VarUInt { /* private fields */ }
Expand description
Represents a variable-length unsigned integer. See the VarUInt and VarInt Fields section of the binary Ion spec for more details.
Implementations§
source§impl VarUInt
impl VarUInt
sourcepub fn read<R: IonDataSource>(data_source: &mut R) -> IonResult<VarUInt>
pub fn read<R: IonDataSource>(data_source: &mut R) -> IonResult<VarUInt>
Reads a VarUInt from the provided data source.
sourcepub fn write_u64<W: Write>(sink: &mut W, magnitude: u64) -> IonResult<usize>
pub fn write_u64<W: Write>(sink: &mut W, magnitude: u64) -> IonResult<usize>
Encodes the given unsigned int value as a VarUInt and writes it to the sink, returning the number of bytes written.
sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Returns the number of bytes that were read from the data source to construct this unsigned integer
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for VarUInt
impl Send for VarUInt
impl Sync for VarUInt
impl Unpin for VarUInt
impl UnwindSafe for VarUInt
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