pub trait ReadStr: Read {
fn read_str(&mut self, buf: &mut str) -> Result<usize>;
fn read_exact_str(&mut self, buf: &mut str) -> Result<()> { ... }
}
Expand description
Extend the Read
trait with read_str
, a method for reading UTF-8 data.
Required Methods§
Provided Methods§
sourcefn read_exact_str(&mut self, buf: &mut str) -> Result<()>
fn read_exact_str(&mut self, buf: &mut str) -> Result<()>
Like read_exact
but produces the result in a str
.