Struct write_into::LittleEndian
source · [−]pub struct LittleEndian<T>(pub T);
Expand description
Used to write values in little endian byte order.
Example
use write_into::{LittleEndian, write_into};
let mut buffer = Vec::new();
write_into(&mut buffer, LittleEndian(0xCAFEBABEu32)).unwrap();
assert_eq!(&buffer, &[0xBE, 0xBA, 0xFE, 0xCA]);
Tuple Fields
0: T
Trait Implementations
sourceimpl WriteInto for LittleEndian<i8>
impl WriteInto for LittleEndian<i8>
type Output = ()
type Output = ()
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 &LittleEndian<i8>
impl WriteInto for &LittleEndian<i8>
type Output = ()
type Output = ()
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 LittleEndian<isize>
impl WriteInto for LittleEndian<isize>
type Output = ()
type Output = ()
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 &LittleEndian<isize>
impl WriteInto for &LittleEndian<isize>
type Output = ()
type Output = ()
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 LittleEndian<u8>
impl WriteInto for LittleEndian<u8>
type Output = ()
type Output = ()
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 &LittleEndian<u8>
impl WriteInto for &LittleEndian<u8>
type Output = ()
type Output = ()
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 LittleEndian<u16>
impl WriteInto for LittleEndian<u16>
type Output = ()
type Output = ()
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 &LittleEndian<u16>
impl WriteInto for &LittleEndian<u16>
type Output = ()
type Output = ()
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 LittleEndian<u32>
impl WriteInto for LittleEndian<u32>
type Output = ()
type Output = ()
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 &LittleEndian<u32>
impl WriteInto for &LittleEndian<u32>
type Output = ()
type Output = ()
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 LittleEndian<u64>
impl WriteInto for LittleEndian<u64>
type Output = ()
type Output = ()
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 &LittleEndian<u64>
impl WriteInto for &LittleEndian<u64>
type Output = ()
type Output = ()
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 LittleEndian<i16>
impl WriteInto for LittleEndian<i16>
type Output = ()
type Output = ()
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 LittleEndian<u128>
impl WriteInto for LittleEndian<u128>
type Output = ()
type Output = ()
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 &LittleEndian<u128>
impl WriteInto for &LittleEndian<u128>
type Output = ()
type Output = ()
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 LittleEndian<usize>
impl WriteInto for LittleEndian<usize>
type Output = ()
type Output = ()
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 &LittleEndian<usize>
impl WriteInto for &LittleEndian<usize>
type Output = ()
type Output = ()
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 LittleEndian<bool>
impl WriteInto for LittleEndian<bool>
type Output = ()
type Output = ()
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 &LittleEndian<bool>
impl WriteInto for &LittleEndian<bool>
type Output = ()
type Output = ()
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 LittleEndian<char>
impl WriteInto for LittleEndian<char>
type Output = ()
type Output = ()
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 &LittleEndian<char>
impl WriteInto for &LittleEndian<char>
type Output = ()
type Output = ()
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 LittleEndian<f32>
impl WriteInto for LittleEndian<f32>
type Output = ()
type Output = ()
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 &LittleEndian<f32>
impl WriteInto for &LittleEndian<f32>
type Output = ()
type Output = ()
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 &LittleEndian<i16>
impl WriteInto for &LittleEndian<i16>
type Output = ()
type Output = ()
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 LittleEndian<f64>
impl WriteInto for LittleEndian<f64>
type Output = ()
type Output = ()
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 &LittleEndian<f64>
impl WriteInto for &LittleEndian<f64>
type Output = ()
type Output = ()
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 LittleEndian<i32>
impl WriteInto for LittleEndian<i32>
type Output = ()
type Output = ()
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 &LittleEndian<i32>
impl WriteInto for &LittleEndian<i32>
type Output = ()
type Output = ()
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 LittleEndian<i64>
impl WriteInto for LittleEndian<i64>
type Output = ()
type Output = ()
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 &LittleEndian<i64>
impl WriteInto for &LittleEndian<i64>
type Output = ()
type Output = ()
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 LittleEndian<i128>
impl WriteInto for LittleEndian<i128>
type Output = ()
type Output = ()
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 &LittleEndian<i128>
impl WriteInto for &LittleEndian<i128>
type Output = ()
type Output = ()
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 LittleEndian<T> where
T: RefUnwindSafe,
impl<T> Send for LittleEndian<T> where
T: Send,
impl<T> Sync for LittleEndian<T> where
T: Sync,
impl<T> Unpin for LittleEndian<T> where
T: Unpin,
impl<T> UnwindSafe for LittleEndian<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