mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-21 02:04:31 +00:00
macros: add type-wide attributes
This commit is contained in:
parent
8bc3fe522e
commit
45b51dd51a
2 changed files with 12 additions and 0 deletions
|
@ -553,6 +553,9 @@ define_request_and_response! {
|
||||||
get_output_distribution,
|
get_output_distribution,
|
||||||
cc73fe71162d564ffda8e549b79a350bca53c454 =>
|
cc73fe71162d564ffda8e549b79a350bca53c454 =>
|
||||||
core_rpc_server_commands_defs.h => 2445..=2520,
|
core_rpc_server_commands_defs.h => 2445..=2520,
|
||||||
|
/// This type is also used in the (undocumented)
|
||||||
|
/// [`/get_output_distribution.bin`](https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.h#L138)
|
||||||
|
/// binary endpoint.
|
||||||
GetOutputDistribution,
|
GetOutputDistribution,
|
||||||
Request {
|
Request {
|
||||||
amounts: Vec<u64>,
|
amounts: Vec<u64>,
|
||||||
|
|
|
@ -57,6 +57,9 @@ macro_rules! define_request_and_response {
|
||||||
$monero_code_line_end:literal,
|
$monero_code_line_end:literal,
|
||||||
|
|
||||||
// The base `struct` name.
|
// The base `struct` name.
|
||||||
|
// Attributes added here will apply to _both_
|
||||||
|
// request and response types.
|
||||||
|
$( #[$type_attr:meta] )*
|
||||||
$type_name:ident,
|
$type_name:ident,
|
||||||
|
|
||||||
// The request type (and any doc comments, derives, etc).
|
// The request type (and any doc comments, derives, etc).
|
||||||
|
@ -89,6 +92,9 @@ macro_rules! define_request_and_response {
|
||||||
$monero_code_line_start,
|
$monero_code_line_start,
|
||||||
$monero_code_line_end,
|
$monero_code_line_end,
|
||||||
)]
|
)]
|
||||||
|
///
|
||||||
|
$( #[$type_attr] )*
|
||||||
|
///
|
||||||
$( #[$request_type_attr] )*
|
$( #[$request_type_attr] )*
|
||||||
[<$type_name Request>] {
|
[<$type_name Request>] {
|
||||||
$(
|
$(
|
||||||
|
@ -112,6 +118,9 @@ macro_rules! define_request_and_response {
|
||||||
$monero_code_line_start,
|
$monero_code_line_start,
|
||||||
$monero_code_line_end,
|
$monero_code_line_end,
|
||||||
)]
|
)]
|
||||||
|
///
|
||||||
|
$( #[$type_attr] )*
|
||||||
|
///
|
||||||
$( #[$response_type_attr] )*
|
$( #[$response_type_attr] )*
|
||||||
$response_base_type => [<$type_name Response>] {
|
$response_base_type => [<$type_name Response>] {
|
||||||
$(
|
$(
|
||||||
|
|
Loading…
Reference in a new issue