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