# command.CommandResult.stderr_lossy

- **Module:** command.CommandResult
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/command.rs#L1176
- **Page:** https://libtmux.org/en/rs/latest/reference/command-commandresult-stderr_lossy/

```
command.CommandResult.stderr_lossy(self) -> Cow<'_, str>
```

Return a named lossy UTF-8 view of stderr.

## Example

```rust
let server = libtmux::Server::builder().socket_path("/tmp/libtmux-rs-test/result-stderr-lossy.sock").build()?;
let result = server.cmd(libtmux::Command::new("list-sessions")).await?;
let _text = result.stderr_lossy();
server.shutdown().await?;
```
