pub fn generate_server_trait(service: &ServiceDef) -> Result<TokenStream>Expand description
Generate server trait for a service
Example output:
#[async_trait::async_trait]
pub trait UserService: Send + Sync {
type Error: Into<synapse_rpc::ServiceError> + Send;
async fn get_user(&self, request: GetUserRequest) -> Result<GetUserResponse, Self::Error>;
async fn create_user(&self, request: CreateUserRequest) -> Result<CreateUserResponse, Self::Error>;
}