Attribute Macro blockz_derive::singleton_fn [−][src]
#[singleton_fn]
Modify a method on a type that implements the Singleton trait.
The modified method becomes a function that will use the underlying singleton.
The input function must have the following properties:
- the first argument must be a reference receiver (&self or &mut self)
- function arguments identifiers must not conflict with other identifiers from the function body (such as other function names in function calls, struct fields etc)
- references are not allowed (use Box<T> or Arc<T> instead)