Trait rthrift_tutorial::tutorial::CalculatorSyncHandler [] [src]

pub trait CalculatorSyncHandler: SharedServiceSyncHandler {
    fn handle_ping(&self) -> Result<()>;
fn handle_add(&self, num1: i32, num2: i32) -> Result<i32>;
fn handle_calculate(&self, logid: i32, w: Work) -> Result<i32>;
fn handle_zip(&self) -> Result<()>; }

Ahh, now onto the cool part, defining a service. Services just need a name and can optionally inherit from another service using the extends keyword.

Required Methods

A method definition looks like C code. It has a return type, arguments, and optionally a list of exceptions that it may throw. Note that argument lists and exception lists are specified using the exact same syntax as field lists in struct or exception definitions.

This method has a oneway modifier. That means the client only makes a request and does not listen for any response at all. Oneway methods must be void.

Implementors