Enum EncoderLit

Source
pub enum EncoderLit<'a> {
Show 27 variants Bytes(&'a Vec<u8>), Bool(&'a bool), BoolVec(&'a Vec<bool>), Int32(&'a i32), Int32Vec(&'a Vec<i32>), Int64(&'a i64), Int64Vec(&'a Vec<i64>), UInt32(&'a u32), UInt32Vec(&'a Vec<u32>), UInt64(&'a u64), UInt64Vec(&'a Vec<u64>), Float(&'a f32), FloatVec(&'a Vec<f32>), Double(&'a f64), DoubleVec(&'a Vec<f64>), SInt32(&'a i32), SInt32Vec(&'a Vec<i32>), SInt64(&'a i64), SInt64Vec(&'a Vec<i64>), Fixed32(&'a u32), Fixed32Vec(&'a Vec<u32>), Fixed64(&'a u64), Fixed64Vec(&'a Vec<u64>), SFixed32(&'a i32), SFixed32Vec(&'a Vec<i32>), SFixed64(&'a i64), SFixed64Vec(&'a Vec<i64>),
}
Expand description

Provides encoder input format options.

This is a list of all binary formats supported by the encoder.

Variants§

§

Bytes(&'a Vec<u8>)

Represents binary format of wire type 2.

§

Bool(&'a bool)

Represents bool format of wire type 0.

§

BoolVec(&'a Vec<bool>)

Represents bool format of wire type 2 for packed repeated fields.

§

Int32(&'a i32)

Represents int32 format of wire type 0.

§

Int32Vec(&'a Vec<i32>)

Represents int32 format of wire type 0 for packed repeated fields.

§

Int64(&'a i64)

Represents int64 format of wire type 0.

§

Int64Vec(&'a Vec<i64>)

Represents int64 format of wire type 0 for packed repeated fields.

§

UInt32(&'a u32)

Represents uint32 format of wire type 0.

§

UInt32Vec(&'a Vec<u32>)

Represents uint32 format of wire type 0 for packed repeated fields.

§

UInt64(&'a u64)

Represents uint64 format of wire type 0.

§

UInt64Vec(&'a Vec<u64>)

Represents uint64 format of wire type 0 for packed repeated fields.

§

Float(&'a f32)

Represents float format of wire type 5.

§

FloatVec(&'a Vec<f32>)

Represents float format of wire type 5 for packed repeated fields.

§

Double(&'a f64)

Represents uint32 format of wire type 1.

§

DoubleVec(&'a Vec<f64>)

Represents double format of wire type 1 for packed repeated fields.

§

SInt32(&'a i32)

Represents sint32 format of wire type 0. Use it when the value is likely to be negative.

§

SInt32Vec(&'a Vec<i32>)

Represents sint32 format of wire type 0 for packed repeated fields. Use it when the values are likely to be negative.

§

SInt64(&'a i64)

Represents sint64 format of wire type 0. Use it when the value is likely to be negative.

§

SInt64Vec(&'a Vec<i64>)

Represents sint64 format of wire type 0 for packed repeated fields. Use it when the values are likely to be negative.

§

Fixed32(&'a u32)

Represents fixed32 format of wire type 5.

§

Fixed32Vec(&'a Vec<u32>)

Represents fixed32 format of wire type 5 for packed repeated fields.

§

Fixed64(&'a u64)

Represents fixed64 format of wire type 1.

§

Fixed64Vec(&'a Vec<u64>)

Represents fixed64 format of wire type 1 for packed repeated fields.

§

SFixed32(&'a i32)

Represents sfixed32 format of wire type 5.

§

SFixed32Vec(&'a Vec<i32>)

Represents sfixed32 format of wire type 5 for packed repeated fields.

§

SFixed64(&'a i64)

Represents sfixed64 format of wire type 1.

§

SFixed64Vec(&'a Vec<i64>)

Represents sfixed64 format of wire type 1 for packed repeated fields.

Trait Implementations§

Source§

impl<'a> Debug for EncoderLit<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a Vec<bool>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<bool>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<f32>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<f32>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<f64>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<f64>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<i32>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<i32>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<i64>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<i64>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<u32>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<u64>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<u64>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<u8>> for EncoderLit<'a>

Source§

fn from(v: &'a Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a bool> for EncoderLit<'a>

Source§

fn from(v: &'a bool) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a f32> for EncoderLit<'a>

Source§

fn from(v: &'a f32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a f64> for EncoderLit<'a>

Source§

fn from(v: &'a f64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i32> for EncoderLit<'a>

Source§

fn from(v: &'a i32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i64> for EncoderLit<'a>

Source§

fn from(v: &'a i64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u32> for EncoderLit<'a>

Source§

fn from(v: &'a u32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u64> for EncoderLit<'a>

Source§

fn from(v: &'a u64) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for EncoderLit<'a>

§

impl<'a> RefUnwindSafe for EncoderLit<'a>

§

impl<'a> Send for EncoderLit<'a>

§

impl<'a> Sync for EncoderLit<'a>

§

impl<'a> Unpin for EncoderLit<'a>

§

impl<'a> UnwindSafe for EncoderLit<'a>

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> 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, 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.