macro_rules! graphql_scalar {
( @as_expr $e:expr) => { ... };
(
@generate,
meta = {
name = $name:ty,
outname = {$($outname:tt)+},
scalar = {$($scalar:tt)+},
$(description = $descr:tt,)*
},
resolve = {
self_var = $resolve_self_var:ident,
body = $resolve_body: block,
return_type = $resolve_retun_type: ty,
},
from_input_value = {
arg = $from_input_value_arg: ident,
result = $from_input_value_result: ty,
body = $from_input_value_body: block,
},
from_str = {
value_arg = $from_str_arg: ident,
result = $from_str_result: ty,
body = $from_str_body: block,
lifetime = $from_str_lt: tt,
},
) => { ... };
(
@parse_functions,
meta = {
name = $name:ty,
outname = {$($outname:tt)+},
scalar = {$($scalar:tt)+},
$(description = $descr:tt,)*
},
resolve = {$($resolve_body:tt)+},
from_input_value = {$($from_input_value_body:tt)+},
from_str = {$($from_str_body:tt)+},
rest =
) => { ... };
(
@parse_functions,
meta = {
name = $name:ty,
outname = {$($outname:tt)+},
scalar = {$($scalar:tt)+},
$(description = $descr:tt,)*
},
$(from_input_value = {$($from_input_value_body:tt)+})*,
$(from_str = {$($from_str_body:tt)+})*,
rest =
) => { ... };
(
@parse_functions,
meta = {
name = $name:ty,
outname = {$($outname:tt)+},
scalar = {$($scalar:tt)+},
$(description = $descr:tt,)*
},
resolve = {$($resolve_body:tt)+},
$(from_str = {$($from_str_body:tt)+})*,
rest =
) => { ... };
(
@parse_functions,
meta = {
name = $name:ty,
outname = {$($outname:tt)+},
scalar = {$($scalar:tt)+},
$(description = $descr:tt,)*
},
resolve = {$($resolve_body:tt)+},
from_input_value = {$($from_input_value_body:tt)+},
rest =
) => { ... };
(
@parse_functions,
meta = {$($meta:tt)*},
$(resolve = {$($resolve_body:tt)+},)*
$(from_input_value = {$($from_input_value_body:tt)+},)*
$(from_str = {$($from_str_body:tt)+},)*
rest = resolve(&$selfvar:ident) -> $return_ty:ty $body:block $($rest:tt)*
) => { ... };
(
@parse_functions,
meta = { $($meta:tt)* },
$(resolve = {$($resolve_body:tt)+})*,
$(from_input_value = {$($from_input_value_body:tt)+},)*
$(from_str = {$($from_str_body:tt)+},)*
rest = from_input_value($arg:ident: &InputValue) -> $result:ty $body:block $($rest:tt)*
) => { ... };
(
@parse_functions,
meta = { $($meta:tt)* },
$(resolve = {$($resolve_body:tt)+},)*
$(from_input_value = {$($from_input_value_body:tt)+},)*
$(from_str = {$($from_str_body:tt)+},)*
rest = from_str<$from_str_lt: tt>($value_arg:ident: ScalarToken<$ignored_lt2: tt>) -> $result:ty $body:block $($rest:tt)*
) => { ... };
(
@parse_functions,
meta = {
name = $name:ty,
outname = {$($outname:tt)+},
scalar = {$($scalar:tt)+},
},
$(resolve = {$($resolve_body:tt)+},)*
$(from_input_value = {$($from_input_value_body:tt)+},)*
$(from_str = {$($from_str_body:tt)+},)*
rest = description: $descr:tt $($rest:tt)*
) => { ... };
(
@parse,
meta = {
lifetimes = [],
name = $name: ty,
outname = {$($outname:tt)*},
scalar = {$($scalar:tt)*},
},
rest = $($rest:tt)*
) => { ... };
(@$($stuff:tt)*) => { ... };
($($rest:tt)*) => { ... };
}