Expand description
§use-thread-name
Primitive thread name and thread count vocabulary.
use-thread-name models thread names and non-zero thread counts as plain values. It does not name actual running threads, create threads, manage threads, or replace std::thread.
use use_thread_name::{ThreadCount, ThreadName};
let name = ThreadName::new("worker").unwrap();
let count = ThreadCount::new(4).unwrap();
assert_eq!(name.as_str(), "worker");
assert_eq!(count.get(), 4);Structs§
- Thread
Count - A non-zero thread count.
- Thread
Name - A non-empty thread name value.
Enums§
- Thread
Count Error - Errors returned while constructing thread counts.
- Thread
Name Error - Errors returned while constructing thread names.