pub struct CodedInputStream<'a> { /* private fields */ }
Expand description

Buffered read with handy utilities.

Implementations

Wrap a Read.

Note resulting CodedInputStream is buffered even if Read is not.

Create from BufRead.

CodedInputStream will utilize BufRead buffer.

Read from byte slice

Read from Bytes.

CodedInputStream operations like read_carllerche_bytes will return a shared copy of this bytes object.

Set the recursion limit.

How many bytes processed

How many bytes until current limit

Read bytes into given buf.

Return 0 on EOF.

Read one byte

Push new limit, return previous limit.

Restore previous limit.

Are we at EOF?

Check we are at EOF.

Return error if we are not at EOF.

Read varint

Read varint

Read little-endian 32-bit integer

Read little-endian 64-bit integer

Read tag

Read tag, return it is pair (field number, wire type)

Read double

Read float

Read int64

Read int32

Read uint64

Read uint32

Read sint64

Read sint32

Read fixed64

Read fixed32

Read sfixed64

Read sfixed32

Read bool

Read enum as ProtobufEnum

Read repeated packed double

Read repeated packed float

Read repeated packed int64

Read repeated packed int32

Read repeated packed uint64

Read repeated packed uint32

Read repeated packed sint64

Read repeated packed sint32

Read repeated packed fixed64

Read repeated packed fixed32

Read repeated packed sfixed64

Read repeated packed sfixed32

Read repeated packed bool

Read repeated packed enum into ProtobufEnum

Read UnknownValue

Skip field

Read raw bytes into the supplied vector. The vector will be resized as needed and overwritten.

Read exact number of bytes

Skip exact number of bytes

Read bytes field, length delimited

Read bytes field, length delimited

Read string field, length delimited

Read bytes field, length delimited

Read string field, length delimited

Read string field, length delimited

Read message, do not check if message is initialized

Read message

Trait Implementations

Returns the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to read. Read more

🔬 This is a nightly-only experimental API. (buf_read_has_data_left)

Check if the underlying Read has any data left to be read. Read more

Read all bytes into buf until the delimiter byte or EOF is reached. Read more

Read all bytes until a newline (the 0xA byte) is reached, and append them to the provided buffer. Read more

Returns an iterator over the contents of this reader split on the byte byte. Read more

Returns an iterator over the lines of this reader. Read more

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

Like read, except that it reads into a slice of buffers. Read more

🔬 This is a nightly-only experimental API. (can_vector)

Determines if this Reader has an efficient read_vectored implementation. Read more

Read all bytes until EOF in this source, placing them into buf. Read more

Read all bytes until EOF in this source, appending them to buf. Read more

Read the exact number of bytes required to fill buf. Read more

🔬 This is a nightly-only experimental API. (read_buf)

Pull some bytes from this source into the specified buffer. Read more

🔬 This is a nightly-only experimental API. (read_buf)

Read the exact number of bytes required to fill buf. Read more

Creates a “by reference” adaptor for this instance of Read. Read more

Transforms this Read instance to an Iterator over its bytes. Read more

Creates an adapter which will chain this stream with another. Read more

Creates an adapter which will read at most limit bytes from it. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.