# target.SessionName.new

- **Module:** target.SessionName
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/target.rs#L692
- **Page:** https://libtmux.org/reference/rs/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.
