# client.Client.suspend

- **Module:** client.Client
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/client.rs#L428
- **Page:** https://libtmux.org/reference/rs/client-client-suspend/

```
client.Client.suspend(self) -> Result<(), Error>
```

Suspend this client, as if its user pressed the suspend key.

The handle survives, and deliberately: unlike [`Self::detach`], this
stops the client rather than ending it. tmux stops listing a suspended
client, so [`Server::clients`] will not show it and the session stops
counting it as attached, but it is still there. It returns when its
process continues, which for a suspended client is `SIGCONT`.

[`Server::clients`]: crate::Server::clients

# Errors

Returns an error when tmux refuses the command. Reading through the
handle afterwards gives [`Error::ClientSuspended`] rather than
[`Error::ObjectGone`], so a caller can tell this from a client that
left.
