# server.discovery.Server.session_by_id

- **Module:** server.discovery.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/server/discovery.rs#L170
- **Page:** https://libtmux.org/reference/rs/server-discovery-server-session_by_id/

```
server.discovery.Server.session_by_id(self, id: &SessionId) -> Result<Option<Session>, Error>
```

Find the session with this id.

# Errors

Returns an error when the session listing fails.
