Struct TarsDecoder

Source
pub struct TarsDecoder { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Debug for TarsDecoder

Source§

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

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

impl<'a> From<&'a [u8]> for TarsDecoder

Source§

fn from(buf: &'a [u8]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Bytes> for TarsDecoder

Source§

fn from(buf: &'a Bytes) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for TarsDecoder

Source§

fn from(buf: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl<T> TarsDecodeListTrait<T> for TarsDecoder
where T: DecodeTars,

Source§

default fn read_list( &mut self, tag: u8, is_require: bool, default_value: Vec<T>, ) -> Result<Vec<T>, DecodeErr>

Source§

impl TarsDecodeListTrait<bool> for TarsDecoder

Source§

fn read_list( &mut self, tag: u8, is_require: bool, default_value: Vec<bool>, ) -> Result<Vec<bool>, DecodeErr>

Source§

impl TarsDecodeListTrait<i8> for TarsDecoder

Source§

fn read_list( &mut self, tag: u8, is_require: bool, default_value: Vec<i8>, ) -> Result<Vec<i8>, DecodeErr>

Source§

impl TarsDecodeNormalTrait for TarsDecoder

Source§

fn read_int8( &mut self, tag: u8, is_require: bool, default_value: i8, ) -> Result<i8, DecodeErr>

Source§

fn read_boolean( &mut self, tag: u8, is_require: bool, default_value: bool, ) -> Result<bool, DecodeErr>

Source§

fn read_int16( &mut self, tag: u8, is_require: bool, default_value: i16, ) -> Result<i16, DecodeErr>

Source§

fn read_int32( &mut self, tag: u8, is_require: bool, default_value: i32, ) -> Result<i32, DecodeErr>

Source§

fn read_int64( &mut self, tag: u8, is_require: bool, default_value: i64, ) -> Result<i64, DecodeErr>

Source§

fn read_uint8( &mut self, tag: u8, is_require: bool, default_value: u8, ) -> Result<u8, DecodeErr>

Source§

fn read_uint16( &mut self, tag: u8, is_require: bool, default_value: u16, ) -> Result<u16, DecodeErr>

Source§

fn read_uint32( &mut self, tag: u8, is_require: bool, default_value: u32, ) -> Result<u32, DecodeErr>

Source§

fn read_float( &mut self, tag: u8, is_require: bool, default_value: f32, ) -> Result<f32, DecodeErr>

Source§

fn read_double( &mut self, tag: u8, is_require: bool, default_value: f64, ) -> Result<f64, DecodeErr>

Source§

fn read_string( &mut self, tag: u8, is_require: bool, default_value: String, ) -> Result<String, DecodeErr>

Source§

fn read_bytes( &mut self, tag: u8, is_require: bool, default_value: Bytes, ) -> Result<Bytes, DecodeErr>

Source§

fn read_map<K, V>( &mut self, tag: u8, is_require: bool, default_value: BTreeMap<K, V>, ) -> Result<BTreeMap<K, V>, DecodeErr>
where K: DecodeTars + Ord, V: DecodeTars,

Source§

fn read_enum<T>( &mut self, tag: u8, is_require: bool, default_value: T, ) -> Result<T, DecodeErr>

Source§

fn read_struct<T>( &mut self, tag: u8, is_require: bool, default_value: T, ) -> Result<T, DecodeErr>
where T: StructFromTars,

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