pub struct TarsEncoder { /* private fields */ }Implementations§
Source§impl TarsEncoder
impl TarsEncoder
pub fn new() -> Self
pub fn individual_encode<T>(ele: &T) -> Result<Bytes, EncodeErr>where
T: EncodeTars,
pub fn to_bytes(self) -> Bytes
pub fn to_bytes_mut(self) -> BytesMut
pub fn check_maybe_resize(&mut self, len: usize)
Trait Implementations§
Source§impl Clone for TarsEncoder
impl Clone for TarsEncoder
Source§fn clone(&self) -> TarsEncoder
fn clone(&self) -> TarsEncoder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TarsEncoder
impl Debug for TarsEncoder
impl Eq for TarsEncoder
Source§impl Ord for TarsEncoder
impl Ord for TarsEncoder
Source§fn cmp(&self, other: &TarsEncoder) -> Ordering
fn cmp(&self, other: &TarsEncoder) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TarsEncoder
impl PartialEq for TarsEncoder
Source§fn eq(&self, other: &TarsEncoder) -> bool
fn eq(&self, other: &TarsEncoder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for TarsEncoder
impl PartialOrd for TarsEncoder
impl StructuralPartialEq for TarsEncoder
Source§impl<T> TarsEncodeListTrait<T> for TarsEncoderwhere
T: EncodeTars,
impl<T> TarsEncodeListTrait<T> for TarsEncoderwhere
T: EncodeTars,
Source§impl TarsEncodeListTrait<bool> for TarsEncoder
impl TarsEncodeListTrait<bool> for TarsEncoder
Source§impl TarsEncodeListTrait<i8> for TarsEncoder
impl TarsEncodeListTrait<i8> for TarsEncoder
Source§impl TarsEncoderNormalTrait for TarsEncoder
impl TarsEncoderNormalTrait for TarsEncoder
fn write_int8(&mut self, tag: u8, ele: i8) -> Result<(), EncodeErr>
fn write_boolean(&mut self, tag: u8, ele: bool) -> Result<(), EncodeErr>
fn write_int16(&mut self, tag: u8, ele: i16) -> Result<(), EncodeErr>
fn write_int32(&mut self, tag: u8, ele: i32) -> Result<(), EncodeErr>
fn write_int64(&mut self, tag: u8, ele: i64) -> Result<(), EncodeErr>
fn write_uint8(&mut self, tag: u8, ele: u8) -> Result<(), EncodeErr>
fn write_uint16(&mut self, tag: u8, ele: u16) -> Result<(), EncodeErr>
fn write_uint32(&mut self, tag: u8, ele: u32) -> Result<(), EncodeErr>
fn write_float(&mut self, tag: u8, ele: f32) -> Result<(), EncodeErr>
fn write_double(&mut self, tag: u8, ele: f64) -> Result<(), EncodeErr>
fn write_string(&mut self, tag: u8, ele: &String) -> Result<(), EncodeErr>
fn write_bytes(&mut self, tag: u8, ele: &Bytes) -> Result<(), EncodeErr>
fn write_map<K, V>( &mut self, tag: u8, ele: &BTreeMap<K, V>, ) -> Result<(), EncodeErr>
fn write_enum<T>(&mut self, tag: u8, ele: &T) -> Result<(), EncodeErr>where
T: EnumToI32,
fn write_struct<T>(&mut self, tag: u8, ele: &T) -> Result<(), EncodeErr>where
T: StructToTars,
Auto Trait Implementations§
impl !Freeze for TarsEncoder
impl RefUnwindSafe for TarsEncoder
impl Send for TarsEncoder
impl Sync for TarsEncoder
impl Unpin for TarsEncoder
impl UnsafeUnpin for TarsEncoder
impl UnwindSafe for TarsEncoder
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