Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

formats.text.TmuxText.parse

Rust
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
formats.text
Declared in
TmuxText
Package
libtmux
Source
crates/libtmux/src/formats/text.rs
parse ( self ) → Option<T>
method [source]
method [source]
parse

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.

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

Esc

Type to search.