pub struct AsIs;
Expand description
Serialize values as-is, in little-endian bytes order.
Trait Implementations§
source§impl Serializer<u16> for AsIs
impl Serializer<u16> for AsIs
source§const CONST_SIZE: Option<usize> = _
const CONST_SIZE: Option<usize> = _
Either size of each value in bytes (if each value occupies constant size) or
None
.source§fn write<W: Write + ?Sized>(output: &mut W, val: u16) -> Result<()>
fn write<W: Write + ?Sized>(output: &mut W, val: u16) -> Result<()>
Serialize
val
to the given output
.source§fn read<R: Read + ?Sized>(input: &mut R) -> Result<u16>
fn read<R: Read + ?Sized>(input: &mut R) -> Result<u16>
Deserialize value from the given
input
.source§fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn array_content_size(array: &[T]) -> usize
fn array_content_size(array: &[T]) -> usize
Returns number of bytes occupied by serialized content of the array.
source§fn array_size(array: &[T]) -> usize
fn array_size(array: &[T]) -> usize
Returns number of bytes which
write_array
needs to serialize array
.source§impl Serializer<u32> for AsIs
impl Serializer<u32> for AsIs
source§const CONST_SIZE: Option<usize> = _
const CONST_SIZE: Option<usize> = _
Either size of each value in bytes (if each value occupies constant size) or
None
.source§fn write<W: Write + ?Sized>(output: &mut W, val: u32) -> Result<()>
fn write<W: Write + ?Sized>(output: &mut W, val: u32) -> Result<()>
Serialize
val
to the given output
.source§fn read<R: Read + ?Sized>(input: &mut R) -> Result<u32>
fn read<R: Read + ?Sized>(input: &mut R) -> Result<u32>
Deserialize value from the given
input
.source§fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn array_content_size(array: &[T]) -> usize
fn array_content_size(array: &[T]) -> usize
Returns number of bytes occupied by serialized content of the array.
source§fn array_size(array: &[T]) -> usize
fn array_size(array: &[T]) -> usize
Returns number of bytes which
write_array
needs to serialize array
.source§impl Serializer<u64> for AsIs
impl Serializer<u64> for AsIs
source§const CONST_SIZE: Option<usize> = _
const CONST_SIZE: Option<usize> = _
Either size of each value in bytes (if each value occupies constant size) or
None
.source§fn write<W: Write + ?Sized>(output: &mut W, val: u64) -> Result<()>
fn write<W: Write + ?Sized>(output: &mut W, val: u64) -> Result<()>
Serialize
val
to the given output
.source§fn read<R: Read + ?Sized>(input: &mut R) -> Result<u64>
fn read<R: Read + ?Sized>(input: &mut R) -> Result<u64>
Deserialize value from the given
input
.source§fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn array_content_size(array: &[T]) -> usize
fn array_content_size(array: &[T]) -> usize
Returns number of bytes occupied by serialized content of the array.
source§fn array_size(array: &[T]) -> usize
fn array_size(array: &[T]) -> usize
Returns number of bytes which
write_array
needs to serialize array
.source§impl Serializer<u8> for AsIs
impl Serializer<u8> for AsIs
source§const CONST_SIZE: Option<usize> = _
const CONST_SIZE: Option<usize> = _
Either size of each value in bytes (if each value occupies constant size) or
None
.source§fn write<W: Write + ?Sized>(output: &mut W, val: u8) -> Result<()>
fn write<W: Write + ?Sized>(output: &mut W, val: u8) -> Result<()>
Serialize
val
to the given output
.source§fn read<R: Read + ?Sized>(input: &mut R) -> Result<u8>
fn read<R: Read + ?Sized>(input: &mut R) -> Result<u8>
Deserialize value from the given
input
.source§fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn array_content_size(array: &[T]) -> usize
fn array_content_size(array: &[T]) -> usize
Returns number of bytes occupied by serialized content of the array.
source§fn array_size(array: &[T]) -> usize
fn array_size(array: &[T]) -> usize
Returns number of bytes which
write_array
needs to serialize array
.impl Copy for AsIs
Auto Trait Implementations§
impl RefUnwindSafe for AsIs
impl Send for AsIs
impl Sync for AsIs
impl Unpin for AsIs
impl UnwindSafe for AsIs
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
source§impl<S> Serializer<usize> for Swhere
S: Serializer<u64>,
impl<S> Serializer<usize> for Swhere
S: Serializer<u64>,
source§const CONST_SIZE: Option<usize> = const CONST_SIZE: Option<usize> = S::CONST_SIZE;
const CONST_SIZE: Option<usize> = const CONST_SIZE: Option<usize> = S::CONST_SIZE;
Either size of each value in bytes (if each value occupies constant size) or
None
.source§fn write<W>(output: &mut W, val: usize) -> Result<(), Error>
fn write<W>(output: &mut W, val: usize) -> Result<(), Error>
Serialize
val
to the given output
.source§fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all_values<W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
fn write_all<'a, W, InIter>(output: &mut W, values: InIter) -> Result<()>
Serialize all
values
into the given output
.source§fn array_content_size(array: &[T]) -> usize
fn array_content_size(array: &[T]) -> usize
Returns number of bytes occupied by serialized content of the array.
source§fn array_size(array: &[T]) -> usize
fn array_size(array: &[T]) -> usize
Returns number of bytes which
write_array
needs to serialize array
.