Struct ion_rs::binary::uint::DecodedUInt
source · pub struct DecodedUInt { /* private fields */ }
Expand description
Represents a fixed-length unsigned integer. See the UInt and Int Fields section of the binary Ion spec for more details.
Implementations§
source§impl DecodedUInt
impl DecodedUInt
sourcepub fn read<R: IonDataSource>(
data_source: &mut R,
length: usize
) -> IonResult<DecodedUInt>
pub fn read<R: IonDataSource>( data_source: &mut R, length: usize ) -> IonResult<DecodedUInt>
Reads a UInt with length
bytes 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 provided magnitude
as a UInt and writes it to the provided sink
.
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§
source§impl Debug for DecodedUInt
impl Debug for DecodedUInt
source§impl From<DecodedUInt> for Int
impl From<DecodedUInt> for Int
source§fn from(uint: DecodedUInt) -> Self
fn from(uint: DecodedUInt) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for DecodedUInt
impl Send for DecodedUInt
impl Sync for DecodedUInt
impl Unpin for DecodedUInt
impl UnwindSafe for DecodedUInt
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