service

Attribute Macro service 

Source
#[service]
Expand description

Attribute macro for Service impl blocks - generates message enum, Service impl, and Client methods

#[service]
impl PaymentService {
    pub async fn process(&self, amount: u32) -> String {
        // ...
    }
}

Generates:

  • Message enum with variants for each public async method
  • impl Service for PaymentService
  • Client extension trait + impl