# pane.observe.Pane.capture

- **Module:** pane.observe.Pane
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/pane/observe.rs#L81
- **Page:** https://libtmux.org/reference/rs/pane-observe-pane-capture/

```
pane.observe.Pane.capture(self) -> Result<Vec<TmuxText>, Error>
```

Capture the pane's visible contents, one entry per line.

Lines are [`TmuxText`] because a terminal's contents are arbitrary
bytes, not guaranteed UTF-8.

# Errors

Returns an error when tmux refuses the command.
