# formats.text.TmuxText.parse

- **Module:** formats.text.TmuxText
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/formats/text.rs#L133
- **Page:** https://libtmux.org/en/rs/latest/reference/formats-text-tmuxtext-parse/

```
formats.text.TmuxText.parse(self) -> Option<T>
```

Parse these bytes as any type that reads from a string.

Returns `None` when the bytes are not UTF-8 or do not parse, so a
caller reading a numeric option does not have to check both.

## Example

```rust
use libtmux::TmuxText;

assert_eq!(TmuxText::from("2000").parse::<u32>(), Some(2000));
assert_eq!(TmuxText::from("many").parse::<u32>(), None);
```
