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
impl Clone for FixintEncoding
source§fn clone(&self) -> FixintEncoding
fn clone(&self) -> FixintEncoding
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl IntEncoding for FixintEncoding
impl IntEncoding for FixintEncoding
fn serialize_u16<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u16, ) -> Result<()>
fn serialize_u32<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u32, ) -> Result<()>
fn serialize_u64<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u64, ) -> Result<()>
fn serialize_i16<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i16, ) -> Result<()>
fn serialize_i32<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i32, ) -> Result<()>
fn serialize_i64<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i64, ) -> Result<()>
fn deserialize_u16<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u16>
fn deserialize_u32<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u32>
fn deserialize_u64<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u64>
fn deserialize_i16<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i16>
fn deserialize_i32<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i32>
fn deserialize_i64<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i64>
fn u128_size(_: u128) -> u64
fn i128_size(_: i128) -> u64
fn serialize_u128<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: u128, ) -> Result<()>
fn serialize_i128<W: Write, O: Options>( ser: &mut Serializer<W, O>, val: i128, ) -> Result<()>
fn deserialize_u128<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<u128>
fn deserialize_i128<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<i128>
fn len_size(len: usize) -> u64
source§fn serialize_len<W: Write, O: Options>(
ser: &mut Serializer<W, O>,
len: usize,
) -> Result<()>
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>
fn deserialize_len<'de, R: BincodeRead<'de>, O: Options>( de: &mut Deserializer<R, O>, ) -> Result<usize>
Deserializes a sequence length.
impl Copy for FixintEncoding
Auto Trait Implementations§
impl Freeze for FixintEncoding
impl RefUnwindSafe for FixintEncoding
impl Send for FixintEncoding
impl Sync for FixintEncoding
impl Unpin for FixintEncoding
impl UnwindSafe for FixintEncoding
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)