# server.discovery.Server.window_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#L190
- **Page:** https://libtmux.org/reference/rs/server-discovery-server-window_by_id/

```
server.discovery.Server.window_by_id(self, id: &WindowId) -> Result<Option<Window>, Error>
```

Find the window with this id, through the first link that reaches it.

A window linked into several sessions is returned once. Use
[`Server::windows_or_empty`] when the link matters.

# Errors

Returns an error when the window listing fails.
