Trait basic_text::ReadText

source ·
pub trait ReadText: ReadStr {
    // Required method
    fn read_text_substr(&mut self, buf: &mut TextSubstr) -> Result<usize>;

    // Provided methods
    fn read_exact_text_substr(&mut self, buf: &mut TextSubstr) -> Result<()> { ... }
    fn read_to_text_string(&mut self, buf: &mut TextString) -> Result<usize> { ... }
}
Expand description

Add a convenience method for reading Basic Text content.

Required Methods§

source

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

Like read_str but for reading Basic Text content. 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.

Provided Methods§

source

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

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

source

fn read_to_text_string(&mut self, buf: &mut TextString) -> Result<usize>

Like read_to_string, but reads into a TextString.

Implementors§