Struct grpcio::ServiceBuilder [−][src]
pub struct ServiceBuilder { /* fields omitted */ }
Expand description
Service
factory in order to configure the properties.
Use it to build a service which can be registered to a server.
Implementations
impl ServiceBuilder
[src]
impl ServiceBuilder
[src]pub fn new() -> ServiceBuilder
[src]
pub fn new() -> ServiceBuilder
[src]Initialize a new ServiceBuilder
.
pub fn add_unary_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, Req, UnarySink<Resp>) + Send + Clone + 'static,
[src]
pub fn add_unary_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, Req, UnarySink<Resp>) + Send + Clone + 'static,
[src]Add a unary RPC call handler.
pub fn add_client_streaming_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, RequestStream<Req>, ClientStreamingSink<Resp>) + Send + Clone + 'static,
[src]
pub fn add_client_streaming_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, RequestStream<Req>, ClientStreamingSink<Resp>) + Send + Clone + 'static,
[src]Add a client streaming RPC call handler.
pub fn add_server_streaming_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, Req, ServerStreamingSink<Resp>) + Send + Clone + 'static,
[src]
pub fn add_server_streaming_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, Req, ServerStreamingSink<Resp>) + Send + Clone + 'static,
[src]Add a server streaming RPC call handler.
pub fn add_duplex_streaming_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, RequestStream<Req>, DuplexSink<Resp>) + Send + Clone + 'static,
[src]
pub fn add_duplex_streaming_handler<Req, Resp, F>(
self,
method: &Method<Req, Resp>,
handler: F
) -> ServiceBuilder where
Req: 'static,
Resp: 'static,
F: FnMut(RpcContext<'_>, RequestStream<Req>, DuplexSink<Resp>) + Send + Clone + 'static,
[src]Add a duplex streaming RPC call handler.
pub fn build(self) -> Service
[src]
pub fn build(self) -> Service
[src]Finalize the ServiceBuilder
and build the Service
.