# control.protocol.read_line

- **Module:** control.protocol
- **Package:** libtmux
- **Language:** Rust
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/control/protocol.rs#L15
- **Page:** https://libtmux.org/reference/rs/control-protocol-read_line/

```
control.protocol.read_line(stdout: &mut R, pending: &mut Vec<u8>, limit: usize) -> Result<Option<Line>, Error>
```

Read and classify one protocol line.

`pending` carries a line across calls. `read_until` appends what it read
before it was cancelled, which is what makes this usable in `select!` --
`read_line` would lose those bytes, and would also reject the pane output
that is not UTF-8.
