pub struct TarsDecoder { /* private fields */ }
Implementations§
Source§impl TarsDecoder
impl TarsDecoder
pub fn new() -> TarsDecoder
pub fn individual_decode<T>(buf: &Bytes) -> Result<T, DecodeErr>where
T: DecodeTars,
Trait Implementations§
Source§impl Debug for TarsDecoder
impl Debug for TarsDecoder
Source§impl<'a> From<&'a [u8]> for TarsDecoder
impl<'a> From<&'a [u8]> for TarsDecoder
Source§impl<'a> From<&'a Bytes> for TarsDecoder
impl<'a> From<&'a Bytes> for TarsDecoder
Source§impl<T> TarsDecodeListTrait<T> for TarsDecoderwhere
T: DecodeTars,
impl<T> TarsDecodeListTrait<T> for TarsDecoderwhere
T: DecodeTars,
Source§impl TarsDecodeListTrait<bool> for TarsDecoder
impl TarsDecodeListTrait<bool> for TarsDecoder
Source§impl TarsDecodeListTrait<i8> for TarsDecoder
impl TarsDecodeListTrait<i8> for TarsDecoder
Source§impl TarsDecodeNormalTrait for TarsDecoder
impl TarsDecodeNormalTrait for TarsDecoder
fn read_int8( &mut self, tag: u8, is_require: bool, default_value: i8, ) -> Result<i8, DecodeErr>
fn read_boolean( &mut self, tag: u8, is_require: bool, default_value: bool, ) -> Result<bool, DecodeErr>
fn read_int16( &mut self, tag: u8, is_require: bool, default_value: i16, ) -> Result<i16, DecodeErr>
fn read_int32( &mut self, tag: u8, is_require: bool, default_value: i32, ) -> Result<i32, DecodeErr>
fn read_int64( &mut self, tag: u8, is_require: bool, default_value: i64, ) -> Result<i64, DecodeErr>
fn read_uint8( &mut self, tag: u8, is_require: bool, default_value: u8, ) -> Result<u8, DecodeErr>
fn read_uint16( &mut self, tag: u8, is_require: bool, default_value: u16, ) -> Result<u16, DecodeErr>
fn read_uint32( &mut self, tag: u8, is_require: bool, default_value: u32, ) -> Result<u32, DecodeErr>
fn read_float( &mut self, tag: u8, is_require: bool, default_value: f32, ) -> Result<f32, DecodeErr>
fn read_double( &mut self, tag: u8, is_require: bool, default_value: f64, ) -> Result<f64, DecodeErr>
fn read_string( &mut self, tag: u8, is_require: bool, default_value: String, ) -> Result<String, DecodeErr>
fn read_bytes( &mut self, tag: u8, is_require: bool, default_value: Bytes, ) -> Result<Bytes, DecodeErr>
fn read_map<K, V>( &mut self, tag: u8, is_require: bool, default_value: BTreeMap<K, V>, ) -> Result<BTreeMap<K, V>, DecodeErr>
fn read_enum<T>(
&mut self,
tag: u8,
is_require: bool,
default_value: T,
) -> Result<T, DecodeErr>where
T: EnumFromI32 + EnumToI32,
fn read_struct<T>(
&mut self,
tag: u8,
is_require: bool,
default_value: T,
) -> Result<T, DecodeErr>where
T: StructFromTars,
Auto Trait Implementations§
impl !Freeze for TarsDecoder
impl RefUnwindSafe for TarsDecoder
impl Send for TarsDecoder
impl Sync for TarsDecoder
impl Unpin for TarsDecoder
impl UnwindSafe for TarsDecoder
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