#macro #u8 #creation

arcm

Provides a macro for more concise Arc<Mutex<_>> creation

1 unstable release

Uses new Rust 2021

0.1.0 Nov 21, 2022

#1123 in Rust patterns

29 downloads per month

WTFPL license

3KB

arcm

Macro for more concise Arc<Mutex<_>> creation.

arcm!(42) expands to Arc::new(Mutex::new(42)).

arcm!(42, u8) expands to Arc::new(Mutex::<u8>::new(42)) for explicit type hints.

There's also an ArcM type alias.

And that's all.

License

This code is available under the WTFPL.


lib.rs:

Provides a macro for more concise Arc<Mutex<_>> creation.

No runtime deps