[−][src]Struct protobuf::stream::CodedInputStream
Methods
impl<'a> CodedInputStream<'a>
[src]
ⓘImportant traits for CodedInputStream<'a>pub fn new(read: &'a mut dyn Read) -> CodedInputStream<'a>
[src]
ⓘImportant traits for CodedInputStream<'a>pub fn from_buffered_reader(
buf_read: &'a mut dyn BufRead
) -> CodedInputStream<'a>
[src]
buf_read: &'a mut dyn BufRead
) -> CodedInputStream<'a>
ⓘImportant traits for CodedInputStream<'a>pub fn from_bytes(bytes: &'a [u8]) -> CodedInputStream<'a>
[src]
pub fn set_recursion_limit(&mut self, limit: u32)
[src]
Set the recursion limit.
pub fn pos(&self) -> u64
[src]
pub fn bytes_until_limit(&self) -> u64
[src]
pub fn read(&mut self, buf: &mut [u8]) -> ProtobufResult<()>
[src]
pub fn read_raw_byte(&mut self) -> ProtobufResult<u8>
[src]
pub fn push_limit(&mut self, limit: u64) -> ProtobufResult<u64>
[src]
pub fn pop_limit(&mut self, old_limit: u64)
[src]
pub fn eof(&mut self) -> ProtobufResult<bool>
[src]
pub fn check_eof(&mut self) -> ProtobufResult<()>
[src]
pub fn read_raw_varint64(&mut self) -> ProtobufResult<u64>
[src]
pub fn read_raw_varint32(&mut self) -> ProtobufResult<u32>
[src]
pub fn read_raw_little_endian32(&mut self) -> ProtobufResult<u32>
[src]
pub fn read_raw_little_endian64(&mut self) -> ProtobufResult<u64>
[src]
pub fn read_tag(&mut self) -> ProtobufResult<Tag>
[src]
pub fn read_tag_unpack(&mut self) -> ProtobufResult<(u32, WireType)>
[src]
pub fn read_double(&mut self) -> ProtobufResult<f64>
[src]
pub fn read_float(&mut self) -> ProtobufResult<f32>
[src]
pub fn read_int64(&mut self) -> ProtobufResult<i64>
[src]
pub fn read_int32(&mut self) -> ProtobufResult<i32>
[src]
pub fn read_uint64(&mut self) -> ProtobufResult<u64>
[src]
pub fn read_uint32(&mut self) -> ProtobufResult<u32>
[src]
pub fn read_sint64(&mut self) -> ProtobufResult<i64>
[src]
pub fn read_sint32(&mut self) -> ProtobufResult<i32>
[src]
pub fn read_fixed64(&mut self) -> ProtobufResult<u64>
[src]
pub fn read_fixed32(&mut self) -> ProtobufResult<u32>
[src]
pub fn read_sfixed64(&mut self) -> ProtobufResult<i64>
[src]
pub fn read_sfixed32(&mut self) -> ProtobufResult<i32>
[src]
pub fn read_bool(&mut self) -> ProtobufResult<bool>
[src]
pub fn read_enum<E: ProtobufEnum>(&mut self) -> ProtobufResult<E>
[src]
pub fn read_repeated_packed_double_into(
&mut self,
target: &mut Vec<f64>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<f64>
) -> ProtobufResult<()>
pub fn read_repeated_packed_float_into(
&mut self,
target: &mut Vec<f32>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<f32>
) -> ProtobufResult<()>
pub fn read_repeated_packed_int64_into(
&mut self,
target: &mut Vec<i64>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<i64>
) -> ProtobufResult<()>
pub fn read_repeated_packed_int32_into(
&mut self,
target: &mut Vec<i32>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<i32>
) -> ProtobufResult<()>
pub fn read_repeated_packed_uint64_into(
&mut self,
target: &mut Vec<u64>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<u64>
) -> ProtobufResult<()>
pub fn read_repeated_packed_uint32_into(
&mut self,
target: &mut Vec<u32>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<u32>
) -> ProtobufResult<()>
pub fn read_repeated_packed_sint64_into(
&mut self,
target: &mut Vec<i64>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<i64>
) -> ProtobufResult<()>
pub fn read_repeated_packed_sint32_into(
&mut self,
target: &mut Vec<i32>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<i32>
) -> ProtobufResult<()>
pub fn read_repeated_packed_fixed64_into(
&mut self,
target: &mut Vec<u64>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<u64>
) -> ProtobufResult<()>
pub fn read_repeated_packed_fixed32_into(
&mut self,
target: &mut Vec<u32>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<u32>
) -> ProtobufResult<()>
pub fn read_repeated_packed_sfixed64_into(
&mut self,
target: &mut Vec<i64>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<i64>
) -> ProtobufResult<()>
pub fn read_repeated_packed_sfixed32_into(
&mut self,
target: &mut Vec<i32>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<i32>
) -> ProtobufResult<()>
pub fn read_repeated_packed_bool_into(
&mut self,
target: &mut Vec<bool>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<bool>
) -> ProtobufResult<()>
pub fn read_repeated_packed_enum_into<E: ProtobufEnum>(
&mut self,
target: &mut Vec<E>
) -> ProtobufResult<()>
[src]
&mut self,
target: &mut Vec<E>
) -> ProtobufResult<()>
pub fn read_unknown(
&mut self,
wire_type: WireType
) -> ProtobufResult<UnknownValue>
[src]
&mut self,
wire_type: WireType
) -> ProtobufResult<UnknownValue>
pub fn skip_field(&mut self, wire_type: WireType) -> ProtobufResult<()>
[src]
pub fn read_raw_bytes_into(
&mut self,
count: u32,
target: &mut Vec<u8>
) -> ProtobufResult<()>
[src]
&mut self,
count: u32,
target: &mut Vec<u8>
) -> ProtobufResult<()>
Read raw bytes into the supplied vector. The vector will be resized as needed and overwritten.
pub fn read_raw_bytes(&mut self, count: u32) -> ProtobufResult<Vec<u8>>
[src]
Read exact number of bytes
pub fn skip_raw_bytes(&mut self, count: u32) -> ProtobufResult<()>
[src]
pub fn read_bytes(&mut self) -> ProtobufResult<Vec<u8>>
[src]
pub fn read_bytes_into(&mut self, target: &mut Vec<u8>) -> ProtobufResult<()>
[src]
pub fn read_string(&mut self) -> ProtobufResult<String>
[src]
pub fn read_string_into(&mut self, target: &mut String) -> ProtobufResult<()>
[src]
pub fn merge_message<M: Message>(
&mut self,
message: &mut M
) -> ProtobufResult<()>
[src]
&mut self,
message: &mut M
) -> ProtobufResult<()>
pub fn read_message<M: Message>(&mut self) -> ProtobufResult<M>
[src]
Trait Implementations
impl<'a> Read for CodedInputStream<'a>
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
default fn read_vectored(
&mut self,
bufs: &mut [IoVecMut]
) -> Result<usize, Error>
[src]
&mut self,
bufs: &mut [IoVecMut]
) -> Result<usize, Error>
iovec
)Like read
, except that it reads into a slice of buffers. Read more
unsafe default fn initializer(&self) -> Initializer
[src]
read_initializer
)Determines if this Read
er can work with buffers of uninitialized memory. Read more
default fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
Read all bytes until EOF in this source, placing them into buf
. Read more
default fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
Read all bytes until EOF in this source, appending them to buf
. Read more
default fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
Read the exact number of bytes required to fill buf
. Read more
default fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Creates a "by reference" adaptor for this instance of Read
. Read more
default fn bytes(self) -> Bytes<Self>
1.0.0[src]
Transforms this Read
instance to an [Iterator
] over its bytes. Read more
default fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
Creates an adaptor which will chain this stream with another. Read more
default fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
Creates an adaptor which will read at most limit
bytes from it. Read more
impl<'a> BufRead for CodedInputStream<'a>
[src]
fn fill_buf(&mut self) -> Result<&[u8]>
[src]
fn consume(&mut self, amt: usize)
[src]
default fn read_until(
&mut self,
byte: u8,
buf: &mut Vec<u8>
) -> Result<usize, Error>
1.0.0[src]
&mut self,
byte: u8,
buf: &mut Vec<u8>
) -> Result<usize, Error>
Read all bytes into buf
until the delimiter byte
or EOF is reached. Read more
default fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
Read all bytes until a newline (the 0xA byte) is reached, and append them to the provided buffer. Read more
default fn split(self, byte: u8) -> Split<Self>
1.0.0[src]
Returns an iterator over the contents of this reader split on the byte byte
. Read more
default fn lines(self) -> Lines<Self>
1.0.0[src]
Returns an iterator over the lines of this reader. Read more
Auto Trait Implementations
impl<'a> !Send for CodedInputStream<'a>
impl<'a> !Sync for CodedInputStream<'a>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,