Planner.steps_bounded
Group a plan, but never share an invocation across a boundary.
Source and package
- Qualified name
-
libtmux::plan:: planner:: Planner:: steps _bounded - Module
- plan.planner
- Declared in
Planner- Package
- libtmux
- Source
- crates/libtmux/src/plan/planner.rs
-
Description#
A boundary is an index after which the caller must do something itself -- wait for a pane to be ready, run a hook -- so no group may span it. Splitting only ever breaks a group into contiguous runs, so it changes the number of invocations and not the result.
Examples#
use std::collections::BTreeSet;use libtmux::plan::{Plan, Planner, SendKeys};use libtmux::PaneId;let pane: PaneId = "%1".parse()?;let mut plan = Plan::new();plan.add(SendKeys::new(pane.clone()).text("one").enter());plan.add(SendKeys::new(pane).text("two").enter());assert_eq!(Planner::Folding.steps(&plan).len(), 1);let after_first = BTreeSet::from([0]);assert_eq!(Planner::Folding.steps_bounded(&plan, &after_first).len(), 2);