pub(crate) struct TCompactSliceInputProtocol<'a> {
buf: &'a [u8],
last_read_field_id: i16,
read_field_id_stack: Vec<i16>,
pending_read_bool_value: Option<bool>,
}
Expand description
A more performant implementation of TCompactInputProtocol
that reads a slice
Fields§
§buf: &'a [u8]
§last_read_field_id: i16
§read_field_id_stack: Vec<i16>
§pending_read_bool_value: Option<bool>
Implementations§
Trait Implementations§
Source§impl TInputProtocol for TCompactSliceInputProtocol<'_>
impl TInputProtocol for TCompactSliceInputProtocol<'_>
Source§fn read_message_begin(&mut self) -> Result<TMessageIdentifier>
fn read_message_begin(&mut self) -> Result<TMessageIdentifier>
Read the beginning of a Thrift message.
Source§fn read_message_end(&mut self) -> Result<()>
fn read_message_end(&mut self) -> Result<()>
Read the end of a Thrift message.
Source§fn read_struct_begin(&mut self) -> Result<Option<TStructIdentifier>>
fn read_struct_begin(&mut self) -> Result<Option<TStructIdentifier>>
Read the beginning of a Thrift struct.
Source§fn read_struct_end(&mut self) -> Result<()>
fn read_struct_end(&mut self) -> Result<()>
Read the end of a Thrift struct.
Source§fn read_field_begin(&mut self) -> Result<TFieldIdentifier>
fn read_field_begin(&mut self) -> Result<TFieldIdentifier>
Read the beginning of a Thrift struct field.
Source§fn read_field_end(&mut self) -> Result<()>
fn read_field_end(&mut self) -> Result<()>
Read the end of a Thrift struct field.
Source§fn read_bytes(&mut self) -> Result<Vec<u8>>
fn read_bytes(&mut self) -> Result<Vec<u8>>
Read a fixed-length byte array.
Source§fn read_double(&mut self) -> Result<f64>
fn read_double(&mut self) -> Result<f64>
Read a 64-bit float.
Source§fn read_string(&mut self) -> Result<String>
fn read_string(&mut self) -> Result<String>
Read a fixed-length string (not null terminated).
Source§fn read_list_begin(&mut self) -> Result<TListIdentifier>
fn read_list_begin(&mut self) -> Result<TListIdentifier>
Read the beginning of a list.
Source§fn read_list_end(&mut self) -> Result<()>
fn read_list_end(&mut self) -> Result<()>
Read the end of a list.
Source§fn read_set_begin(&mut self) -> Result<TSetIdentifier>
fn read_set_begin(&mut self) -> Result<TSetIdentifier>
Read the beginning of a set.
Source§fn read_set_end(&mut self) -> Result<()>
fn read_set_end(&mut self) -> Result<()>
Read the end of a set.
Source§fn read_map_begin(&mut self) -> Result<TMapIdentifier>
fn read_map_begin(&mut self) -> Result<TMapIdentifier>
Read the beginning of a map.
Source§fn read_map_end(&mut self) -> Result<()>
fn read_map_end(&mut self) -> Result<()>
Read the end of a map.
§fn skip(&mut self, field_type: TType) -> Result<(), Error>
fn skip(&mut self, field_type: TType) -> Result<(), Error>
Skip a field with type
field_type
recursively until the default
maximum skip depth is reached.§fn skip_till_depth(&mut self, field_type: TType, depth: i8) -> Result<(), Error>
fn skip_till_depth(&mut self, field_type: TType, depth: i8) -> Result<(), Error>
Skip a field with type
field_type
recursively up to depth
levels.Auto Trait Implementations§
impl<'a> Freeze for TCompactSliceInputProtocol<'a>
impl<'a> RefUnwindSafe for TCompactSliceInputProtocol<'a>
impl<'a> Send for TCompactSliceInputProtocol<'a>
impl<'a> Sync for TCompactSliceInputProtocol<'a>
impl<'a> Unpin for TCompactSliceInputProtocol<'a>
impl<'a> UnwindSafe for TCompactSliceInputProtocol<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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