Derive Macro blockz::Singleton [−][src]
#[derive(Singleton)] { // Attributes available to this derive: #[singleton] }
Derive the Singleton trait.
This requires that the struct or enum is Send.
This derive procedural macro accepts an attribute: #[singleton]
. The attribute may configure
the underlying lock used for securing access to the singleton. Valid values:
#[singleton(lock = "mutex")]
(default)#[singleton(lock = "rwlock")]
Required available imports: