# client.Client.switch_to

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

```
client.Client.switch_to(self, session: &crate::Session) -> Result<(), Error>
```

Point this client at another session.

# Errors

Returns [`Error::ServerMismatch`] when the session belongs to another
server, or an error when the session does not exist or tmux refuses.
