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

TmuxVersion.ensure_supported

Require a numbered release to meet the minimum supported version.

Source and package
Qualified name
libtmux::version::TmuxVersion::ensure_supported
Module
version
Declared in
TmuxVersion
Package
libtmux
Source
crates/libtmux/src/version.rs
pub fn ensure_supported(&self) -> Result<(), Error>

Description#

A numbered next-X.Y report can establish the floor. An undated master report remains diagnostic and cannot qualify dispatch.

Errors

Returns Error::UnsupportedTmuxVersion when the detected release is below tmux 3.3a, and Error::UnrecognizedTmuxVersion for a bare master, which names no release. The version check also refuses a daemon report that is well framed but names no release at all (openbsd-*, 3.3a-dev) as Error::UnrecognizedTmuxVersion, before a TmuxVersion exists to call this on.

Examples#

use libtmux::TmuxVersion;
let version = TmuxVersion::parse_output(b"tmux 3.3a\n")?;
version.ensure_supported()?;
Esc

Type to search.

Reference previewOpen reference