/// Read all bytes until a newline (the `0xA` byte) is reached, and append
/// them to the provided buffer, similar to [`BufRead::read_line`], but
/// require the input to contain valid Basic Text, and require each line
/// to be a valid Basic Text string.
///
/// Basic Text streams always end with a newline, so the returned string
/// will always have a trailing newline.
///
/// This function is blocking and should be used carefully: it is possible
/// for an attacker to continuously send bytes without ever sending a
/// newline or ending the stream.
Read all bytes until a newline (the `0xA` byte) is reached, and append
them to the provided buffer, similar to [`BufRead::read_line`], but
require the input to contain valid Basic Text, and require each line
to be a valid Basic Text string.

Basic Text streams always end with a newline, so the returned string
will always have a trailing newline.

This function is blocking and should be used carefully: it is possible
for an attacker to continuously send bytes without ever sending a
newline or ending the stream.
Read all bytes until a newline ( the ` 0xA ` byte ) is reached and append them to the provided buffer similar to [ ` BufRead :: read_line ` ] but require the input to contain valid Basic Text and require each line to be a valid Basic Text string . Basic Text streams always end with a newline so the returned string will always have a trailing newline . This function is blocking and should be used carefully : it is possible for an attacker to continuously send bytes without ever sending a newline or ending the stream .
fn read_text_line(&mut self, buf: &mut TextString) -> io::Result<usize> {
        let len = self.read_line(&mut buf.0)?;
        if !is_basic_text(&buf.0) {
            buf.0.clear();
            return Err(io::Error::new(
                io::ErrorKind::InvalidData,
                "stream did not contain valid Basic Text",
            ));
        }
        Ok(len)
    }
fn read_text_line ( & mut self , buf : & mut TextString ) -> io :: Result < usize > { let len = self . read_line ( & mut buf . 0 ) ? ; if ! is_basic_text ( & buf . 0 ) { buf . 0 . clear ( ) ; return Err ( io :: Error :: new ( io :: ErrorKind :: InvalidData , " " , ) ) ; } Ok ( len ) }
Read all bytes until a newline (the `0xA` byte) is reached, and append
them to the provided buffer, similar to [`BufRead::read_line`], but
require the input to contain valid Basic Text, and require each line
to be a valid Basic Text string.
Read all bytes until a newline ( the ` 0xA ` byte ) is reached and append them to the provided buffer similar to [ ` BufRead :: read_line ` ] but require the input to contain valid Basic Text and require each line to be a valid Basic Text string .
&mut self
<not_specific>
buf
&mut TextString
<not_specific>