fn lines(self) -> Lines<Self>
    where
        Self: Sized,
    {
        assert_stream::<Result<String>, _>(Lines::new(self))
    }
Returns a stream over the lines of this reader.
This method is the async equivalent to [`BufRead::lines`](std::io::BufRead::lines).

The stream returned from this function will yield instances of
[`io::Result`]`<`[`String`]`>`. Each string returned will *not* have a newline
byte (the 0xA byte) or CRLF (0xD, 0xA bytes) at the end.

[`io::Result`]: std::io::Result
[`String`]: String

# Errors

Each line of the stream has the same error semantics as [`AsyncBufReadExt::read_line`].

[`AsyncBufReadExt::read_line`]: AsyncBufReadExt::read_line

# Examples

```
# futures::executor::block_on(async {
use futures::io::{AsyncBufReadExt, Cursor};
use futures::stream::StreamExt;

let cursor = Cursor::new(b"lorem\nipsum\xc2\r\ndolor");

let mut lines_stream = cursor.lines().map(|l| l.unwrap_or(String::from("invalid UTF_8")));
assert_eq!(lines_stream.next().await, Some(String::from("lorem")));
assert_eq!(lines_stream.next().await, Some(String::from("invalid UTF_8")));
assert_eq!(lines_stream.next().await, Some(String::from("dolor")));
assert_eq!(lines_stream.next().await, None);
# Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
```
futures-util/src/io/mod.rs