# command.CommandResult.success

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

```
command.CommandResult.success(self) -> bool
```

Return whether the process exited successfully.

## Example

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