pub fn generate_client_stub(service: &ServiceDef) -> Result<TokenStream>Expand description
Generate client stub for a service
Generated clients accept a SynClient (unified connection pool) instead of creating their own. This allows efficient connection reuse across all service clients.
Example output:
pub struct UserServiceClient {
client: synapse_sdk::SynClient,
}
impl UserServiceClient {
pub fn new(client: synapse_sdk::SynClient) -> Self { ... }
pub async fn get_user(&self, request: GetUserRequest) -> Result<GetUserResponse> { ... }
}