Struct write_into::Uleb128
source · [−]pub struct Uleb128<T>(pub T);
Expand description
Used to write values in LEB-128 format (unsigned).
Example
use write_into::{Uleb128, write_into};
let mut buffer = Vec::new();
write_into(&mut buffer, Uleb128(69u32)).unwrap();
assert_eq!(&buffer, &[0x45]);
Tuple Fields
0: T
Trait Implementations
sourceimpl WriteInto for Uleb128<u8>
impl WriteInto for Uleb128<u8>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for &Uleb128<u8>
impl WriteInto for &Uleb128<u8>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for Uleb128<usize>
impl WriteInto for Uleb128<usize>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for &Uleb128<usize>
impl WriteInto for &Uleb128<usize>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for Uleb128<u16>
impl WriteInto for Uleb128<u16>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for &Uleb128<u16>
impl WriteInto for &Uleb128<u16>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for Uleb128<u32>
impl WriteInto for Uleb128<u32>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for &Uleb128<u32>
impl WriteInto for &Uleb128<u32>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for Uleb128<u64>
impl WriteInto for Uleb128<u64>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
sourceimpl WriteInto for &Uleb128<u64>
impl WriteInto for &Uleb128<u64>
type Output = usize
type Output = usize
Result of WriteInto::write_into
function (e.g. ()
or usize
).
sourcefn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
fn write_into(self, sink: &mut impl Write) -> Result<Self::Output>
Writes value into I/O sink.
Auto Trait Implementations
impl<T> RefUnwindSafe for Uleb128<T> where
T: RefUnwindSafe,
impl<T> Send for Uleb128<T> where
T: Send,
impl<T> Sync for Uleb128<T> where
T: Sync,
impl<T> Unpin for Uleb128<T> where
T: Unpin,
impl<T> UnwindSafe for Uleb128<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more