Trait basic_text::ReadTextLayered[][src]

pub trait ReadTextLayered: ReadStrLayered {
    fn read_text_substr_with_status(
        &mut self,
        buf: &mut TextSubstr
    ) -> Result<(usize, Status)>; 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

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

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

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

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

impl<Inner: HalfDuplexLayered + ReadStrLayered + WriteStr> ReadTextLayered for TextDuplexer<Inner>[src]

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

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

impl<Inner: ReadStrLayered> ReadTextLayered for TextReader<Inner>[src]

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

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