logo
pub struct Cookie { /* private fields */ }
Expand description

Private state used by the PacketParser.

This is not intended to be used. It is possible to explicitly create Cookie instances using its Default implementation for low-level interfacing with parsing code.

Trait Implementations

Returns a reference to the internal buffer. Read more

Ensures that the internal buffer has at least amount bytes of data, and returns it. Read more

Like BufferedReader::data, but returns an error if there is not at least amount bytes available. Read more

Consumes some of the data. Read more

A convenience function that combines BufferedReader::data and BufferedReader::consume. Read more

A convenience function that effectively combines BufferedReader::data_hard and BufferedReader::consume. Read more

Returns a mutable reference to the inner BufferedReader, if any. Read more

Returns a reference to the inner BufferedReader, if any.

Returns the underlying reader, if any. Read more

Sets the BufferedReader’s cookie and returns the old value.

Returns a reference to the BufferedReader’s cookie.

Returns a mutable reference to the BufferedReader’s cookie.

Returns all of the data until EOF. Like BufferedReader::data, this does not actually consume the data that is read. Read more

Checks whether the end of the stream is reached.

Checks whether this reader is consummated. Read more

A convenience function for reading a 16-bit unsigned integer in big endian format. Read more

A convenience function for reading a 32-bit unsigned integer in big endian format. Read more

Reads until either terminal is encountered or EOF. Read more

Discards the input until one of the bytes in terminals is encountered. Read more

Discards the input until one of the bytes in terminals is encountered. Read more

Like BufferedReader::data_consume_hard, but returns the data in a caller-owned buffer. Read more

Like BufferedReader::steal, but instead of stealing a fixed number of bytes, steals all of the data until the end of file. Read more

Like BufferedReader::steal_eof, but instead of returning the data, the data is discarded. Read more

Copies data to the given writer returning the copied amount. Read more

A helpful debugging aid to pretty print a Buffered Reader stack. Read more

Boxes the reader.

👎 Deprecated:

Use into_boxed

Boxes the reader.

This interface allows a caller to read the content of a PacketParser using the BufferedReader interface. This is essential to supporting streaming operation.

Note: it is safe to mix the use of the std::io::Read and BufferedReader interfaces.

Returns a reference to the internal buffer. Read more

Ensures that the internal buffer has at least amount bytes of data, and returns it. Read more

Like BufferedReader::data, but returns an error if there is not at least amount bytes available. Read more

Returns all of the data until EOF. Like BufferedReader::data, this does not actually consume the data that is read. Read more

Consumes some of the data. Read more

A convenience function that combines BufferedReader::data and BufferedReader::consume. Read more

A convenience function that effectively combines BufferedReader::data_hard and BufferedReader::consume. Read more

Like BufferedReader::data_consume_hard, but returns the data in a caller-owned buffer. Read more

Like BufferedReader::steal, but instead of stealing a fixed number of bytes, steals all of the data until the end of file. Read more

Returns a mutable reference to the inner BufferedReader, if any. Read more

Returns a reference to the inner BufferedReader, if any.

Returns the underlying reader, if any. Read more

Sets the BufferedReader’s cookie and returns the old value.

Returns a reference to the BufferedReader’s cookie.

Returns a mutable reference to the BufferedReader’s cookie.

Checks whether the end of the stream is reached.

Checks whether this reader is consummated. Read more

A convenience function for reading a 16-bit unsigned integer in big endian format. Read more

A convenience function for reading a 32-bit unsigned integer in big endian format. Read more

Reads until either terminal is encountered or EOF. Read more

Discards the input until one of the bytes in terminals is encountered. Read more

Discards the input until one of the bytes in terminals is encountered. Read more

Like BufferedReader::steal_eof, but instead of returning the data, the data is discarded. Read more

Copies data to the given writer returning the copied amount. Read more

A helpful debugging aid to pretty print a Buffered Reader stack. Read more

Boxes the reader.

👎 Deprecated:

Use into_boxed

Boxes the reader.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

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.