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.

enum libtmux-rs latest

SessionNameError

Why a session name is one tmux could not address.

Source and package
Qualified name
libtmux::target::SessionNameError
Module
target
Package
libtmux
Source
crates/libtmux/src/target.rs
enum target.SessionNameError

Examples#

use libtmux::{SessionName, SessionNameError};
// tmux splits a target on `:` and `.`, so a name holding either would not be
// addressable by name afterwards.
assert!(matches!(
SessionName::new("build:release"),
Err(SessionNameError::Separator { separator: ':' }),
));
assert!(matches!(SessionName::new(""), Err(SessionNameError::Empty)));
assert!(SessionName::new("build-release").is_ok());

Variants2#

SessionNameError variants
CasePayloadDescription
Empty No payload The name is empty, which tmux reads as "the current session".
Separator { separator: char } The name holds a character tmux splits targets on.
Esc

Type to search.

Reference previewOpen reference