# target.SessionName.new

- **Module:** target.SessionName
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/target.rs#L695
- **Page:** https://libtmux.org/en/rs/latest/reference/target-sessionname-new/

```
target.SessionName.new(name: impl Into<String>) -> Result<Self, SessionNameError>
```

Check a name tmux will be able to address.

# Errors

Returns [`SessionNameError`] for an empty name, or one holding a tmux
target separator.
