Struct WithOtherIntEncoding

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

A configuration struct with a user-specified length encoding

Trait Implementations§

Source§

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

Source§

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

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

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, dest: *mut u8)

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

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Options for T
where 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>(self, t: &S) -> Result<Vec<u8>, Box<ErrorKind>>
where S: Serialize + ?Sized,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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, T>( self, seed: T, reader: R, ) -> Result<<T as DeserializeSeed<'a>>::Value, Box<ErrorKind>>
where R: BincodeRead<'a>, T: DeserializeSeed<'a>,

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V