# target.SessionNameError

- **Module:** target
- **Package:** libtmux
- **Language:** Rust
- **Kind:** enum
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/target.rs#L755
- **Page:** https://libtmux.org/en/rs/latest/reference/target-sessionnameerror/

Why a session name is one tmux could not address.

## Example

```rust
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());
```

## Members

- `Empty` (constant): The name is empty, which tmux reads as "the current session".
- `Separator` (constant): The name holds a character tmux splits targets on.
