formats.text.TmuxText.parse
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- formats.text
- Declared in
- TmuxText
- Package
- libtmux
- Source
- crates/libtmux/src/formats/text.rs
-
Parse these bytes as any type that reads from a string.
Returns
Nonewhen the bytes are not UTF-8 or do not parse, so a caller reading a numeric option does not have to check both.Examples
use libtmux::TmuxText;assert_eq!(TmuxText::from("2000").parse::<u32>(), Some(2000));assert_eq!(TmuxText::from("many").parse::<u32>(), None);
0 declared, 0 inherited