#[service]Expand description
Marks a trait as a vox RPC service and generates all service code.
§Generated Items
For a trait named Calculator, this generates:
mod calculatorcontaining:pub useof common types (Tx, Rx, VoxError, etc.)mod method_idwith lazy method ID functionstrait Calculator- the service traitstruct CalculatorDispatcher<H>- server-side dispatcherstruct CalculatorClient- client for making calls
§Example
ⓘ
#[vox::service]
trait Calculator {
async fn add(&self, a: i32, b: i32) -> i32;
}