A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/embedded-io/0.6.1/x86_64-unknown-linux-gnu/embedded_io/trait.BufRead.html below:

BufRead in embedded_io - Rust

pub trait BufRead: ErrorType {
    // Required methods
    fn fill_buf(&mut self) -> Result<&[u8], Self::Error>;
    fn consume(&mut self, amt: usize);
}
Expand description

Blocking buffered reader.

This trait is the embedded-io equivalent of std::io::BufRead.

Source

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

If no bytes are currently available to read, this function blocks until at least one byte is available.

If the reader is at end-of-file (EOF), an empty slice is returned. There is no guarantee that a reader at EOF will always be so in the future, for example a reader can stop being at EOF if another process appends more bytes to the underlying file.

Source

Tell this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to fill_buf.

Source§ Source§ Source§

Available on crate features std or alloc only.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4