#[service]
Expand description
Defines new RPC service
All parameter types must implement both of [serde::Serialize
] and [serde::Deserialize
].
The trait name will be converted to snake_case module, and all related definitions will be defined inside the module.
Available Attributes for Traits
no_service
: Do not generate service-related code (TODO)no_client
: Do not generate client-related code (TODO)
Available Attributes for Methods
sync
: Force generation of synchronous functionsaliases = "..."
: Additional routes for the method. This is useful when you want to have multiple routes for the same method.with_reuse
: Generate*_with_reuse
series of methods. This is useful when you want to optimize buffer allocation over multiple consecutive calls.skip
: Do not generate any code from this. This is useful when you need just a trait method, which can be used another default implementations.route
: Rename routing for caller