Trait prost_simple_rpc::handler::Handler [−][src]
pub trait Handler: Clone + Send + 'static { type Error: Fail; type Descriptor: ServiceDescriptor; type CallFuture: Future<Item = Bytes, Error = Self::Error> + Send; fn call(
&self,
method: <Self::Descriptor as ServiceDescriptor>::Method,
input: Bytes
) -> Self::CallFuture; }
An implementation of a specific RPC handler.
This can be an actual implementation of a service, or something that will send a request over a network to fulfill a request.
Associated Types
type Error: Fail
The type of errors that this handler might generate, beyond the default RPC error type.
type Descriptor: ServiceDescriptor
The service descriptor for the service whose requests this handler can handle.
type CallFuture: Future<Item = Bytes, Error = Self::Error> + Send
The future that results from a call to the call
method of this trait.
Required Methods
fn call(
&self,
method: <Self::Descriptor as ServiceDescriptor>::Method,
input: Bytes
) -> Self::CallFuture
&self,
method: <Self::Descriptor as ServiceDescriptor>::Method,
input: Bytes
) -> Self::CallFuture
Perform a raw call to the specified service and method.