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.

trait libtmux-rs latest

Chainable

An operation that may share one tmux invocation with its neighbours.

Source and package
Qualified name
libtmux::plan::Chainable
Module
plan
Package
libtmux
Source
crates/libtmux/src/plan.rs
trait plan.Chainable

Description#

A folded run of commands returns one merged stdout with no per-command boundary, so an operation whose output is its answer cannot be folded: its lines would be indistinguishable from its neighbours'. This trait is implemented only for the operations where that cannot happen, which makes Plan::chain() reject the others at compile time.

Examples#

use libtmux::plan::{CapturePane, Plan, SendKeys};
use libtmux::PaneId;
let pane = "%1".parse::<PaneId>().unwrap();
let mut plan = Plan::new();
// CapturePane is not Chainable: its stdout is the answer.
plan.chain(CapturePane::new(pane));
Esc

Type to search.

Reference previewOpen reference