test.unique_name
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- test
- Package
- libtmux
- Source
- crates/libtmux/src/test.rs
-
Build a name no other caller in this process will produce.
The name combines the prefix, the process id, and a counter. Unlike a random name it needs no collision check and no random source, and unlike a bare counter it does not collide between concurrent test processes sharing one server.
Examples
use libtmux::test::unique_name;let first = unique_name("libtmux");let second = unique_name("libtmux");assert_ne!(first, second);assert!(first.starts_with("libtmux-"));
0 declared, 0 inherited