pub struct BufferedReaderReserve<'a, C> { /* private fields */ }
Expand description

A BufferedReaderReserve allows a reader to read everything except for the last N bytes (the reserve) from the underlying BufferedReader.

Note: because the BufferedReaderReserve doesn’t generally know how much data can be read from the underlying BufferedReader, it causes at least N bytes to by buffered.

Implementations

Instantiates a new BufferedReaderReserve.

reader is the source to wrap. reserve is the number of bytes that will not be returned to the reader.

Like new(), but sets a cookie.

The cookie can be retrieved using the cookie_ref and cookie_mut methods, and set using the cookie_set method.

Trait Implementations

Return the buffer. Ensure that it contains at least amount bytes.

Returns a reference to the internal buffer. Read more
Consumes some of the data. Read more
A convenience function that combines data() and consume(). Read more
A convenience function that effectively combines data_hard() and 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.
Like data(), but returns an error if there is not at least amount bytes available. Read more
Returns all of the data until EOF. Like data(), this does not actually consume the data that is read. 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
Like data_consume_hard(), but returns the data in a caller-owned buffer. Read more
Like steal(), but instead of stealing a fixed number of bytes, steals all of the data until the end of file. Read more
Like steal_eof(), but instead of returning the data, the data is discarded. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. 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 cursor. 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

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more
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.