pub trait ReadTextLayered: ReadStrLayered {
    // Required method
    fn read_text_substr_with_status(
        &mut self,
        buf: &mut TextSubstr
    ) -> Result<(usize, Status)>;

    // Provided method
    fn read_exact_text_substr_using_status(
        &mut self,
        buf: &mut TextSubstr
    ) -> Result<Status> { ... }
}
Expand description

Extend the ReadLayered trait with read_text_with_status, a method for reading text data.

Required Methods§

source

fn read_text_substr_with_status( &mut self, buf: &mut TextSubstr ) -> Result<(usize, Status)>

Like read_str_with_status but for reading Basic Text data. Note that the resulting data may not be a Basic Text string, as it may be eg. a portion of a stream that starts with a non-starter.

buf must be at least NORMALIZATION_BUFFER_SIZE bytes long, so that any valid normalized sequence can be read.

Provided Methods§

source

fn read_exact_text_substr_using_status( &mut self, buf: &mut TextSubstr ) -> Result<Status>

Like read_exact_str_using_status but for reading Basic Text content. As with read_text, the resulting string may not be a Basic Text string.

Also, like ReadText::read_exact_text, but uses read_text_with_status to avoid performing an extra read at the end.

Implementors§