pub struct WithOtherIntEncoding<O: Options, I: IntEncoding> { /* private fields */ }
Expand description

A configuration struct with a user-specified length encoding

Trait Implementations§

source§

impl<O: Clone + Options, I: Clone + IntEncoding> Clone for WithOtherIntEncoding<O, I>

source§

fn clone(&self) -> WithOtherIntEncoding<O, I>

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<O: Copy + Options, I: Copy + IntEncoding> Copy for WithOtherIntEncoding<O, I>

Auto Trait Implementations§

§

impl<O, I> RefUnwindSafe for WithOtherIntEncoding<O, I>where I: RefUnwindSafe, O: RefUnwindSafe,

§

impl<O, I> Send for WithOtherIntEncoding<O, I>where I: Send, O: Send,

§

impl<O, I> Sync for WithOtherIntEncoding<O, I>where I: Sync, O: Sync,

§

impl<O, I> Unpin for WithOtherIntEncoding<O, I>where I: Unpin, O: Unpin,

§

impl<O, I> UnwindSafe for WithOtherIntEncoding<O, I>where I: UnwindSafe, O: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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> Options for Twhere T: InternalOptions,

source§

fn with_no_limit(self) -> WithOtherLimit<Self, Infinite>

Sets the byte limit to be unlimited. This is the default.
source§

fn with_limit(self, limit: u64) -> WithOtherLimit<Self, Bounded>

Sets the byte limit to limit.
source§

fn with_little_endian(self) -> WithOtherEndian<Self, LittleEndian>

Sets the endianness to little-endian This is the default.
source§

fn with_big_endian(self) -> WithOtherEndian<Self, BigEndian>

Sets the endianness to big-endian
source§

fn with_native_endian(self) -> WithOtherEndian<Self, NativeEndian>

Sets the endianness to the the machine-native endianness
source§

fn with_varint_encoding(self) -> WithOtherIntEncoding<Self, VarintEncoding>

Sets the length encoding to varint
source§

fn with_fixint_encoding(self) -> WithOtherIntEncoding<Self, FixintEncoding>

Sets the length encoding to be fixed
source§

fn reject_trailing_bytes(self) -> WithOtherTrailing<Self, RejectTrailing>

Sets the deserializer to reject trailing bytes
source§

fn allow_trailing_bytes(self) -> WithOtherTrailing<Self, AllowTrailing>

Sets the deserializer to allow trailing bytes
source§

fn serialize<S: ?Sized + Serialize>(self, t: &S) -> Result<Vec<u8>>

Serializes a serializable object into a Vec of bytes using this configuration
source§

fn serialized_size<T: ?Sized + Serialize>(self, t: &T) -> Result<u64>

Returns the size that an object would be if serialized using Bincode with this configuration
source§

fn serialize_into<W: Write, T: ?Sized + Serialize>( self, w: W, t: &T ) -> Result<()>

Serializes an object directly into a Writer using this configuration Read more
source§

fn deserialize<'a, T: Deserialize<'a>>(self, bytes: &'a [u8]) -> Result<T>

Deserializes a slice of bytes into an instance of T using this configuration
source§

fn deserialize_seed<'a, T: DeserializeSeed<'a>>( self, seed: T, bytes: &'a [u8] ) -> Result<T::Value>

Deserializes a slice of bytes with state seed using this configuration.
source§

fn deserialize_from<R: Read, T: DeserializeOwned>(self, reader: R) -> Result<T>

Deserializes an object directly from a Reader using this configuration Read more
source§

fn deserialize_from_seed<'a, R: Read, T: DeserializeSeed<'a>>( self, seed: T, reader: R ) -> Result<T::Value>

Deserializes an object directly from a Reader with state seed using this configuration Read more
source§

fn deserialize_from_custom<'a, R: BincodeRead<'a>, T: DeserializeOwned>( self, reader: R ) -> Result<T>

Deserializes an object from a custom BincodeReader using the default configuration. It is highly recommended to use deserialize_from unless you need to implement BincodeRead for performance reasons. Read more
source§

fn deserialize_from_custom_seed<'a, R: BincodeRead<'a>, T: DeserializeSeed<'a>>( self, seed: T, reader: R ) -> Result<T::Value>

Deserializes an object from a custom BincodeReader with state seed using the default configuration. It is highly recommended to use deserialize_from unless you need to implement BincodeRead for performance reasons. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.