Struct grpcio::ServiceBuilder [−][src]
pub struct ServiceBuilder { /* fields omitted */ }
Service
factory in order to configure the properties.
Use it to build a service which can be registered to a server.
Methods
impl ServiceBuilder
[src]
impl ServiceBuilder
pub fn new() -> ServiceBuilder
[src]
pub fn new() -> ServiceBuilder
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,
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,
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,
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,
Add a duplex streaming RPC call handler.
pub fn build(self) -> Service
[src]
pub fn build(self) -> Service
Finalize the ServiceBuilder
and build the Service
.
Auto Trait Implementations
impl Send for ServiceBuilder
impl Send for ServiceBuilder
impl !Sync for ServiceBuilder
impl !Sync for ServiceBuilder