macro_rules! define_queue_method {
(
$(#[$doc:meta])*
$method:ident, $return_type:ty, $( $var:ident : $vartype:ty ),*
) => { ... };
(
$(#[$doc:meta])*
$method:ident, $return_type:ty, mut, $( $var:ident : $vartype:ty ),*
) => { ... };
}Expand description
Usage: define_queue_method!(method_name, return_type[, mut][, arg1: arg1_type, arg2: arg2_type, …])
method_name: The name of the method to be defined (as an identifier).return_type: The return type of the method.mut(optional): Include this keyword if the method requires a mutable reference toself(&mut self).arg1: arg1_type, arg2: arg2_type, ...(optional): Include method parameters as a comma-separated list ofname: typepairs, if the method takes any arguments.