Command.requires_tmux
Require a daemon release before dispatching this command.
Source and package
- Qualified name
-
libtmux::command:: Command:: requires _tmux - Module
- command
- Declared in
Command- Package
- libtmux
- Source
- crates/libtmux/src/command.rs
- #[must_use = "use the returned command to retain its version requirement"] pub fn requires_tmux( mut self, capability: &'static str, needs: crate::
Release ) -> SelfVersion -
Description#
Use this when a command starts work whose later cleanup needs a newer tmux. The requirement travels with the command and its chain; refusal happens before any member runs. Repeated calls retain the higher floor.
Examples#
use libtmux::{Command, ReleaseSuffix, ReleaseVersion};let command = Command::new("set-buffer").arg("-b").arg("temporary").sensitive_arg("payload").requires_tmux("temporary buffer cleanup",ReleaseVersion::new(3, 4, ReleaseSuffix::FINAL));assert_eq!(command.summary().sensitive_argument_count(), 1);- Parameters
-
-
capability(&'static str) #
-