Struct bincode::config::int::FixintEncoding

source ·
pub struct FixintEncoding;
Expand description

Fixed-size integer encoding.

  • Fixed size integers are encoded directly
  • Enum discriminants are encoded as u32
  • Lengths and usize are encoded as u64

Trait Implementations§

source§

impl Clone for FixintEncoding

source§

fn clone(&self) -> FixintEncoding

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl IntEncoding for FixintEncoding

source§

fn u16_size(_: u16) -> u64

Gets the size (in bytes) that a value would be serialized to.
source§

fn u32_size(_: u32) -> u64

Gets the size (in bytes) that a value would be serialized to.
source§

fn u64_size(_: u64) -> u64

Gets the size (in bytes) that a value would be serialized to.
source§

fn i16_size(_: i16) -> u64

Gets the size (in bytes) that a value would be serialized to.
source§

fn i32_size(_: i32) -> u64

Gets the size (in bytes) that a value would be serialized to.
source§

fn i64_size(_: i64) -> u64

Gets the size (in bytes) that a value would be serialized to.
source§

fn serialize_u16<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u16, ) -> Result<()>

source§

fn serialize_u32<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u32, ) -> Result<()>

source§

fn serialize_u64<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u64, ) -> Result<()>

source§

fn serialize_i16<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i16, ) -> Result<()>

source§

fn serialize_i32<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i32, ) -> Result<()>

source§

fn serialize_i64<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i64, ) -> Result<()>

source§

fn deserialize_u16<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u16>

source§

fn deserialize_u32<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u32>

source§

fn deserialize_u64<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u64>

source§

fn deserialize_i16<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i16>

source§

fn deserialize_i32<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i32>

source§

fn deserialize_i64<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i64>

source§

fn u128_size(_: u128) -> u64

source§

fn i128_size(_: i128) -> u64

source§

fn serialize_u128<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u128, ) -> Result<()>

source§

fn serialize_i128<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i128, ) -> Result<()>

source§

fn deserialize_u128<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u128>

source§

fn deserialize_i128<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i128>

source§

fn len_size(len: usize) -> u64

source§

fn serialize_len<W: Write, O: Options>( ser: &mut Serializer<W, O>, len: usize, ) -> Result<()>

Serializes a sequence length.
source§

fn deserialize_len<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<usize>

Deserializes a sequence length.
source§

impl Copy for FixintEncoding

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.