# server.interactive.Server.display_menu

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

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

Show a menu over a client.

Items are `(label, key, command)` triples in the order tmux should show
them. 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.
