pub struct RpcServerBuilder { /* private fields */ }Expand description
Builder for constructing an RpcServer.
Implementations§
Source§impl RpcServerBuilder
impl RpcServerBuilder
Sourcepub fn bind(self, addr: SocketAddr) -> Self
pub fn bind(self, addr: SocketAddr) -> Self
Set the address to bind to.
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Set the maximum number of connections.
Sourcepub fn service<S: ServiceDispatch>(self, svc: S) -> Self
pub fn service<S: ServiceDispatch>(self, svc: S) -> Self
Register a service implementation wrapped in its dispatcher.
The service must implement ServiceDispatch - typically via the
generated {Name}Dispatcher wrapper:
ⓘ
.service(CalculatorDispatcher(MyCalculator))Sourcepub fn service_with_id<S: ServiceDispatch>(self, id: u16, svc: S) -> Self
pub fn service_with_id<S: ServiceDispatch>(self, id: u16, svc: S) -> Self
Register a service with an explicit service ID.
Auto Trait Implementations§
impl Freeze for RpcServerBuilder
impl !RefUnwindSafe for RpcServerBuilder
impl Send for RpcServerBuilder
impl Sync for RpcServerBuilder
impl Unpin for RpcServerBuilder
impl UnsafeUnpin for RpcServerBuilder
impl !UnwindSafe for RpcServerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more