Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-rs latest

ServerBuilder

A consuming builder for one inert Server handle.

Source and package
Qualified name
libtmux::server::builder::ServerBuilder
Module
server.builder
Package
libtmux
Source
crates/libtmux/src/server/builder.rs
struct server.builder.ServerBuilder

Examples#

use libtmux::{DispatchLimits, OutputLimits, Server};
use std::time::Duration;
// Naming a socket and a budget is the whole of the configuration; everything
// else is per-command.
let server = Server::builder()
.socket_name("builder-example")
.default_timeout(Duration::from_secs(5))
.output_limits(OutputLimits::default().max_stdout_bytes(1024 * 1024))
.dispatch_limits(DispatchLimits::default().max_in_flight(4))
.build()?;
// Building does not start tmux, so this has not touched the machine yet.
let _ = server.identity();

Members10#

Common operations9#

  • default_timeout method Set the per-command dispatch deadline.
  • build method Capture process context and construct an inert server handle.
  • colors method Request tmux's 256-color compatibility mode.
  • config_file method Select a tmux configuration file.
  • dispatch_limits method Bound how many commands may run at once.
  • output_limits method Bound how many bytes one command may read from tmux.
  • socket_name method Select a named tmux socket, passed to tmux as -L.
  • socket_path method Select an explicit tmux socket path, passed to tmux as -S.
  • tmux_executable method Select the tmux executable without checking that it exists yet.

Other members1#

Esc

Type to search.

Reference previewOpen reference