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.

method libtmux-rs latest

Plan.chain

Record an operation that is allowed to share a tmux invocation.

Source and package
Qualified name
libtmux::plan::Plan::chain
Module
plan
Declared in
Plan
Package
libtmux
Source
crates/libtmux/src/plan.rs
pub fn chain<O: Chainable>( &mut self, operation: O ) -> O::Creates

Description#

Identical to Plan::add() except that the compiler rejects an operation whose output could not be told apart from its neighbours'. Use it to say that intent at the call site; a folding Planner reaches the same grouping on its own.

Examples#

use libtmux::plan::{Plan, SendKeys};
use libtmux::PaneId;
let mut plan = Plan::new();
plan.chain(SendKeys::new("%1".parse::<PaneId>()?).text("make").enter());
Type parameters
Parameters
Esc

Type to search.

Reference previewOpen reference