macro_rules! rwlock { ($e:expr) => { ... }; ($e:expr,) => { ... }; ($($e:expr),+ $(,)?) => { ... }; }
Create a new RwLock.
RwLock
It is also able to create tuples if given more than one parameter.
use std::sync::RwLock; use sugars::rwlock; let rwlk = rwlock!(String::new()); let mut read = rwlk.read().unwrap(); println!("{}", read);