Trait basic_text::ReadTextLayered [−][src]
pub trait ReadTextLayered: ReadStrLayered { fn read_text_with_status(
&mut self,
buf: &mut TextStr
) -> Result<(usize, Status)>; fn read_exact_text_using_status(
&mut self,
buf: &mut TextStr
) -> Result<Status> { ... } }
Expand description
Extend the ReadLayered trait with read_text_with_status, a method for
reading text data.
Required methods
fn read_text_with_status(
&mut self,
buf: &mut TextStr
) -> Result<(usize, Status)>[src]
&mut self,
buf: &mut TextStr
) -> Result<(usize, Status)>
Expand description
Like read_with_status but produces the result in a TextStr. Be sure to
check the return value to see how many bytes were written.
buf must be at least NORMALIZATION_BUFFER_SIZE bytes long, so that any
valid normalized sequence can be read.
Provided methods
fn read_exact_text_using_status(&mut self, buf: &mut TextStr) -> Result<Status>[src]
Expand description
Like read_exact but produces the result in a TextStr.
Also, like ReadText::read_exact_text, but uses read_text_with_status
to avoid performing an extra read at the end.
Implementors
impl<Inner: ReadStrLayered> ReadTextLayered for TextReader<Inner>[src]
impl<Inner: ReadStrLayered> ReadTextLayered for TextReader<Inner>[src]