# server.Server.display_menu

- **Module:** server.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server/interactive.rs#L55
- **Page:** https://libtmux.org/en/rs/latest/reference/server-server-display_menu/

```
server.Server.display_menu(self, client: Option<&Client>, title: &str, items: impl IntoIterator<Item = MenuItem>) -> Result<(), Error>
```

Show a menu over a client.

Items appear in the order given. This needs a client with a terminal.

Like [`Self::command_prompt`], this waits for the person: tmux holds the
invocation until an item is chosen or the menu is dismissed, and the
dispatch timeout is what ends the wait when nobody does.

# Errors

Returns [`Error::ServerMismatch`] when the client belongs to another
server, or an error when no suitable client exists, when tmux refuses
an item, and when the dispatch timeout expires before anyone chooses.
