Struct htrpc::RpcServerBuilder
[−]
[src]
pub struct RpcServerBuilder { /* fields omitted */ }
The RpcServer
builder.
Methods
impl RpcServerBuilder
[src]
fn new(bind_addr: SocketAddr) -> Self
Makes a new RpcServerBuilder
instance.
fn set_logger(&mut self, logger: Logger)
Sets the logger to this server.
fn register<P, H>(&mut self, handler: H) -> Result<()> where
P: Procedure,
H: HandleRpc<P>,
P: Procedure,
H: HandleRpc<P>,
Registers an RPC handler.
fn start<S>(self, spawner: S) -> RpcServer where
S: Spawn + Send + 'static,
S: Spawn + Send + 'static,
Starts the Future
which represents the RPC server.