Struct grpcio::ServiceBuilder
[−]
[src]
pub struct ServiceBuilder { /* fields omitted */ }
Service configuration struct.
Use it to build a service which can be registered to a server.
Methods
impl ServiceBuilder
[src]
fn new() -> ServiceBuilder
[src]
fn add_unary_handler<P, Q, F>(
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, P, UnarySink<Q>) + 'static,
[src]
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, P, UnarySink<Q>) + 'static,
Add a unary rpc call handler.
fn add_client_streaming_handler<P, Q, F>(
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, RequestStream<P>, ClientStreamingSink<Q>) + 'static,
[src]
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, RequestStream<P>, ClientStreamingSink<Q>) + 'static,
Add a client streaming rpc call handler.
fn add_server_streaming_handler<P, Q, F>(
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, P, ServerStreamingSink<Q>) + 'static,
[src]
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, P, ServerStreamingSink<Q>) + 'static,
Add a server streaming rpc call handler.
fn add_duplex_streaming_handler<P, Q, F>(
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, RequestStream<P>, DuplexSink<Q>) + 'static,
[src]
self,
method: &Method<P, Q>,
handler: F
) -> ServiceBuilder where
P: 'static,
Q: 'static,
F: Fn(RpcContext, RequestStream<P>, DuplexSink<Q>) + 'static,
Add a duplex streaming rpc call handler.